Function at 0x180001090
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0x100]
sub rsp, 0x200
mov rax, qword [0x180022010]
xor rax, rsp
mov qword [rbp + 0xf0], rax
mov rbx, qword [rcx + 0x60]
mov rdi, rcx
mov qword [rsp + 0x70], rdx
mov rcx, rbx
mov rax, qword [rbx]
call qword [rax + 0x150]
mov rax, qword [rbx]
lea r8, [rsp + 0x60]
xor edx, edx
mov rcx, rbx
call qword [rax + 0x130]
test eax, eax
js 0x18000152c
mov qword [rsp + 0x230], rsi
mov qword [rsp + 0x238], r14
xor r14d, r14d
mov esi, r14d
cmp dword [rdi + 0x38], r14d
je 0x18000120f
mov rcx, qword [rsp + 0x60]
lea rdx, [rbp - 0x48]
mov rax, qword [rcx]
call qword [rax + 0x60]
test eax, eax
js 0x180001511
mov rax, qword [rbx]
lea rcx, [rsp + 0x50]
mov r9d, dword [rbp - 0x48]
mov r8d, dword [rbp - 0x2c]
mov edx, dword [rbp - 0x30]
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], rcx
mov rcx, rbx
mov qword [rsp + 0x50], r14
mov dword [rsp + 0x20], 2
call qword [rax + 0x120]
test eax, eax
js 0x180001511
mov rax, qword [rbx]
mov rcx, rbx
mov r8, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x60]
call qword [rax + 0x100]
test eax, eax
js 0x1800011fc
mov rcx, qword [rsp + 0x50]
lea r9d, [r14 + 0x10]
xor r8d, r8d
lea rdx, [rsp + 0x78]
mov rax, qword [rcx]
call qword [rax + 0x68]
test eax, eax
js 0x1800011f1
mov eax, dword [rbp - 0x2c]
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
mulss xmm0, dword [rdi + 0x48]
call fcn.180015f18
mov ecx, dword [rsp + 0x78]
mov rbx, qword [rbp - 0x80]
cvttss2si eax, xmm0
xorps xmm0, xmm0
imul ecx, eax
mov eax, dword [rbp - 0x30]
cvtsi2ss xmm0, rax
movsxd rdx, ecx
add rbx, rdx
mulss xmm0, dword [rdi + 0x44]
call fcn.180015f18
cvttss2si eax, xmm0
shl eax, 2
cdqe
mov ecx, dword [rax + rbx]
mov eax, 1
and ecx, 0xffffff
cmp ecx, 0xff00ff
cmovne esi, eax
mov rcx, qword [rsp + 0x50]
mov rax, qword [rcx]
call qword [rax + 0x70]
mov rcx, qword [rsp + 0x50]
mov rax, qword [rcx]
call qword [rax + 0x10]
test esi, esi
je 0x180001511
mov r9, qword [rdi]
lea rax, [rsp + 0x70]
inc dword [rdi + 0x2c]
lea r8, str._ssnapshot_d.ce3dsnapshot
mov qword [rsp + 0x58], rax
lea rcx, [rbp - 0x20]
mov eax, dword [rdi + 0x2c]
add r9, 0x100
mov edx, 0x104
mov dword [rsp + 0x20], eax
mov qword [rsp + 0x68], r14
call fcn.180004390
mov qword [rsp + 0x30], r14
lea rcx, [rbp - 0x20]
mov dword [rsp + 0x28], r14d
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
lea r9, [rsp + 0x40]
mov dword [rsp + 0x44], 9
mov rcx, rax
mov qword [rsp + 0x20], r14
mov r8d, 4
lea rdx, [rsp + 0x44]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rdi]
mov edx, dword [rcx + 0x474]
test edx, edx
je 0x18000130b
mov rcx, qword [rdi]
mov edx, dword [rcx + 0x464]
test edx, edx
je 0x1800012d6
sub edx, 1
je 0x1800012cd
cmp edx, 2
je 0x1800012c4
lea r8, str..WTF
jmp 0x1800012dd
lea r8, str..PNG
jmp 0x1800012dd
lea r8, str..JPG
jmp 0x1800012dd
lea r8, str..BMP
mov edx, 0x104
lea rcx, [rbp - 0x20]
call fcn.180009910
mov rax, qword [rdi]
lea rcx, [rbp - 0x20]
mov r8, qword [rsp + 0x60]
xor r9d, r9d
mov qword [rsp + 0x20], r14
mov edx, dword [rax + 0x464]
call qword [sym.imp.d3dx9_43.dll_D3DXSaveSurfaceToFileA]
mov rax, qword [rdi]
lea rcx, [rsp + 0x68]
mov r8, qword [rsp + 0x60]
xor r9d, r9d
mov qword [rsp + 0x20], r14
mov edx, dword [rax + 0x464]
call qword [sym.imp.d3dx9_43.dll_D3DXSaveSurfaceToFileInMemory]
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x40]
lea rdx, [rsp + 0x44]
mov r8d, 4
test eax, eax
js 0x18000139d
mov rax, qword [rdi]
mov ecx, dword [rax + 0x464]
mov dword [rsp + 0x44], ecx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x68]
mov rax, qword [rcx]
call qword [rax + 0x20]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r14
mov r8d, 4
mov dword [rsp + 0x44], eax
lea rdx, [rsp + 0x44]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x68]
mov rax, qword [rcx]
call qword [rax + 0x18]
mov r8d, dword [rsp + 0x44]
mov rdx, rax
jmp 0x1800013b6
mov rcx, rbx
mov dword [rsp + 0x44], r14d
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r8d, 4
lea rdx, [rsp + 0x44]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r14
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x68]
mov rax, qword [rcx]
call qword [rax + 0x10]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r14
mov r8d, 8
lea rdx, [rsp + 0x58]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x58]
lea rdx, [rbp - 0x78]
mov r8d, 0x30
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x40]
cmp rax, 0x30
jne 0x18000146a
mov rcx, qword [rbp - 0x78]
mov rax, qword [rsp + 0x58]
mov r8, rcx
mov rdx, qword [rbp - 0x60]
sub r8, rax
add r8, rdx
sub edx, eax
add edx, ecx
mov eax, 0x2000
cmp r8, rax
mov rcx, rbx
mov r8d, 4
cmovb eax, edx
lea rdx, [rsp + 0x48]
mov dword [rsp + 0x48], eax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r8d, dword [rsp + 0x48]
lea r9, [rsp + 0x40]
mov rdx, qword [rsp + 0x58]
mov qword [rsp + 0x20], r14
jmp 0x18000147f
mov dword [rsp + 0x48], r14d
lea rdx, [rsp + 0x48]
mov qword [rsp + 0x58], r14
mov r8d, 4
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea r9, [rsp + 0x40]
mov dword [rsp + 0x44], r14d
mov r8d, 4
mov qword [rsp + 0x20], r14
lea rdx, [rsp + 0x44]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x180001508
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp byte [rcx + rax], r14b
jne 0x1800014c0
lea r9, [rsp + 0x40]
mov dword [rsp + 0x4c], eax
mov r8d, 4
mov qword [rsp + 0x20], r14
lea rdx, [rsp + 0x4c]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r8d, dword [rsp + 0x4c]
lea r9, [rsp + 0x40]
mov rdx, qword [rsp + 0x70]
mov rcx, rbx
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x60]
mov rax, qword [rcx]
call qword [rax + 0x10]
mov r14, qword [rsp + 0x238]
mov rsi, qword [rsp + 0x230]
mov rcx, qword [rdi + 0x60]
mov rax, qword [rcx]
call qword [rax + 0x148]
mov rcx, qword [rbp + 0xf0]
xor rcx, rsp
call fcn.180004600
add rsp, 0x200
pop rdi
pop rbx
pop rbp
ret