Function at 0x10001050
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
mov eax, dword [0x10017030]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov ebx, ecx
mov esi, dword [ebx + 0x48]
mov ecx, dword [esi]
mov edx, dword [ecx + 0xa8]
push edi
push esi
mov dword [ebp - 0x140], eax
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x98]
lea ecx, [ebp - 0x128]
push ecx
xor edi, edi
push edi
push esi
call edx
test eax, eax
jl 0x10001523
mov dword [ebp - 0x124], edi
cmp dword [ebx + 0x24], edi
je 0x10001217
mov eax, dword [ebp - 0x128]
mov ecx, dword [eax]
lea edx, [ebp - 0x168]
push edx
push eax
mov eax, dword [ecx + 0x30]
call eax
test eax, eax
jl 0x10001515
mov eax, dword [ebp - 0x168]
mov ecx, dword [esi]
mov ecx, dword [ecx + 0x90]
push edi
lea edx, [ebp - 0x130]
push edx
mov edx, dword [ebp - 0x14c]
push 2
push eax
mov eax, dword [ebp - 0x150]
push edx
push eax
push esi
mov dword [ebp - 0x130], edi
call ecx
test eax, eax
jl 0x10001515
mov eax, dword [ebp - 0x130]
mov ecx, dword [ebp - 0x128]
mov edx, dword [esi]
mov edx, dword [edx + 0x80]
push eax
push ecx
push esi
call edx
test eax, eax
jl 0x100011fd
mov eax, dword [ebp - 0x130]
mov ecx, dword [eax]
push 0x10
push edi
lea edx, [ebp - 0x148]
push edx
push eax
mov eax, dword [ecx + 0x34]
call eax
test eax, eax
jl 0x100011ef
mov ecx, dword [ebp - 0x14c]
fld dword [ebx + 0x34]
fild dword [ebp - 0x14c]
test ecx, ecx
jge 0x1000115a
fadd dword [0x10014dfc]
fmulp st(1)
sub esp, 8
fstp dword [ebp - 0x120]
fld dword [ebp - 0x120]
fstp qword [esp]
call fcn.1000ea00
fstp dword [ebp - 0x120]
fld dword [ebp - 0x120]
call fcn.1000eb30
fld dword [ebx + 0x30]
mov edx, dword [ebp - 0x150]
fild dword [ebp - 0x150]
mov esi, eax
imul esi, dword [ebp - 0x148]
test edx, edx
jge 0x100011a6
fadd dword [0x10014dfc]
fmulp st(1)
fstp dword [ebp - 0x120]
fld dword [ebp - 0x120]
fstp qword [esp]
call fcn.1000ea00
fstp dword [ebp - 0x120]
add esp, 8
fld dword [ebp - 0x120]
call fcn.1000eb30
add esi, dword [ebp - 0x144]
mov eax, dword [esi + eax*4]
and eax, 0xffffff
cmp eax, 0xff00ff
je 0x100011ef
mov dword [ebp - 0x124], 1
mov eax, dword [ebp - 0x130]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x38]
push eax
call edx
mov eax, dword [ebp - 0x130]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
cmp dword [ebp - 0x124], edi
je 0x10001515
mov dword [ebp - 0x13c], edi
mov dword [ebp - 0x138], edi
mov dword [ebp - 0x124], edi
mov dword [ebp - 0x13c], ebp
inc dword [ebx + 0x18]
mov eax, dword [ebx + 0x18]
push eax
mov eax, dword [ebx]
add eax, 0x100
push eax
push str._ssnapshot_d.ce3dsnapshot
lea ecx, [ebp - 0x114]
push 0x104
push ecx
call fcn.1000495f
add esp, 0x14
push edi
push edi
push 2
push edi
push edi
push 0x40000000
lea edx, [ebp - 0x114]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
lea eax, [ebp - 0x118]
push eax
push 4
lea ecx, [ebp - 0x11c]
push ecx
push esi
mov dword [ebp - 0x11c], 9
call edi
mov edx, dword [ebx]
mov eax, dword [edx + 0x474]
test eax, eax
je 0x1000131e
mov ecx, dword [ebx]
mov eax, dword [ecx + 0x464]
sub eax, 0
je 0x100012e5
sub eax, 1
je 0x100012d2
sub eax, 2
je 0x100012bf
push str..WTF
jmp 0x100012ea
push str..PNG
push 0x104
lea eax, [ebp - 0x114]
push eax
jmp 0x100012f6
push str..JPG
push 0x104
lea ecx, [ebp - 0x114]
push ecx
jmp 0x100012f6
push str..BMP
push 0x104
lea edx, [ebp - 0x114]
push edx
call fcn.1000497d
mov eax, dword [ebp - 0x128]
mov ecx, dword [ebx]
mov edx, dword [ecx + 0x464]
add esp, 0xc
push 0
push 0
push eax
push edx
lea eax, [ebp - 0x114]
push eax
call sub.d3dx9_43.dll_D3DXSaveSurfaceToFileA
mov ecx, dword [ebp - 0x128]
mov edx, dword [ebx]
mov eax, dword [edx + 0x464]
push 0
push 0
push ecx
push eax
lea ecx, [ebp - 0x124]
push ecx
call sub.d3dx9_43.dll_D3DXSaveSurfaceToFileInMemory
push 0
test eax, eax
jl 0x100013ae
mov edx, dword [ebx]
mov eax, dword [edx + 0x464]
lea ecx, [ebp - 0x118]
push ecx
push 4
lea edx, [ebp - 0x11c]
push edx
push esi
mov dword [ebp - 0x11c], eax
call edi
mov eax, dword [ebp - 0x124]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
push eax
call edx
push 0
mov dword [ebp - 0x11c], eax
lea eax, [ebp - 0x118]
push eax
push 4
lea ecx, [ebp - 0x11c]
push ecx
push esi
call edi
mov eax, dword [ebp - 0x11c]
push 0
lea edx, [ebp - 0x118]
push edx
push eax
mov eax, dword [ebp - 0x124]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push eax
call edx
jmp 0x100013dc
lea eax, [ebp - 0x118]
push eax
push 4
lea ecx, [ebp - 0x11c]
push ecx
push esi
mov dword [ebp - 0x11c], 0
call edi
push 0
lea edx, [ebp - 0x118]
push edx
push 4
lea eax, [ebp - 0x11c]
push eax
push esi
call edi
mov eax, dword [ebp - 0x124]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
push 0
lea eax, [ebp - 0x118]
push eax
push 8
lea ecx, [ebp - 0x13c]
push ecx
push esi
call edi
mov eax, dword [ebp - 0x13c]
push 0x1c
lea edx, [ebp - 0x184]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
cmp eax, 0x1c
jne 0x10001478
mov ecx, dword [ebp - 0x184]
sub ecx, dword [ebp - 0x13c]
mov edx, dword [ebp - 0x178]
lea eax, [ecx + edx]
mov dword [ebp - 0x12c], eax
cmp eax, 0x2000
jb 0x1000144a
mov dword [ebp - 0x12c], 0x2000
push 0
lea eax, [ebp - 0x118]
push eax
push 4
lea ecx, [ebp - 0x12c]
push ecx
push esi
call edi
mov eax, dword [ebp - 0x12c]
mov ecx, dword [ebp - 0x13c]
push 0
lea edx, [ebp - 0x118]
push edx
push eax
push ecx
jmp 0x1000149d
xor eax, eax
push eax
lea edx, [ebp - 0x118]
push edx
mov dword [ebp - 0x12c], eax
mov dword [ebp - 0x13c], eax
mov dword [ebp - 0x138], eax
push 4
lea eax, [ebp - 0x12c]
push eax
push esi
call edi
push 0
lea ecx, [ebp - 0x118]
push ecx
push 4
lea edx, [ebp - 0x11c]
push edx
push esi
mov dword [ebp - 0x11c], 0
call edi
mov eax, dword [ebp - 0x140]
test eax, eax
je 0x1000150e
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100014d0
sub eax, edx
push 0
mov dword [ebp - 0x120], eax
lea eax, [ebp - 0x118]
push eax
push 4
lea ecx, [ebp - 0x120]
push ecx
push esi
call edi
mov eax, dword [ebp - 0x120]
mov ecx, dword [ebp - 0x140]
push 0
lea edx, [ebp - 0x118]
push edx
push eax
push ecx
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x128]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov ebx, dword [ebx + 0x48]
mov ecx, dword [ebx]
mov edx, dword [ecx + 0xa4]
push ebx
call edx
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10004812
mov esp, ebp
pop ebp
ret 4