Function at 0x40fca0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
mov eax, dword [0x436924]
xor eax, ebp
mov dword [ebp - 0x18], eax
cmp dword [ebp + 8], 0
jne 0x40fcd5
push 0x15
push 0x3a0
push 0x430a38
call fcn.0040b010
add esp, 0xc
or eax, 0xffffffff
jmp 0x40ff34
mov eax, dword [ebp + 8]
cmp dword [eax + 4], 0
jl 0x40fd02
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
cmp edx, dword [0x43f040]
jge 0x40fd02
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
imul ecx, ecx, 0x18
mov edx, dword [0x43f028]
cmp dword [edx + ecx + 4], 0
jne 0x40fd25
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
push ecx
push 5
push 0x3a7
push 0x430a50
call fcn.0040b010
add esp, 0x10
or eax, 0xffffffff
jmp 0x40ff34
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
imul eax, eax, 0x18
add eax, dword [0x43f028]
mov dword [ebp - 0x820], eax
mov ecx, dword [ebp - 0x820]
cmp dword [ecx], 2
je 0x40fd73
mov edx, dword [ebp - 0x820]
cmp dword [edx], 5
je 0x40fd73
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
push ecx
push 0x10
push 0x3ac
push 0x430a68
call fcn.0040b010
add esp, 0x10
or eax, 0xffffffff
jmp 0x40ff34
mov edx, dword [ebp - 0x820]
mov eax, dword [edx + 0x10]
mov ecx, dword [eax + 0x8a0]
push ecx
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov dword [ebp - 0x81c], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x30]
push eax
mov ecx, dword [ebp - 0x81c]
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [ebp + 8]
fld qword [edx + 0x18]
call fcn.0042b990
push eax
mov eax, dword [ebp + 8]
fld qword [eax + 0x10]
call fcn.0042b990
push eax
push 0x430a80
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0x10
mov dword [ebp - 0x824], 0
mov edx, dword [ebp + 8]
fld qword [edx + 0x10]
call fcn.0042b990
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
fld qword [eax + 0x18]
call fcn.0042b990
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], 0
jmp 0x40fe05
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp - 8]
jge 0x40feff
mov dword [ebp - 0x10], 0
jmp 0x40fe23
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 4]
jge 0x40fefa
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x81c]
push ecx
call dword [sym.imp.GDI32.dll_GetPixel]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
and edx, 0xff
mov eax, dword [ebp - 0x824]
mov byte [ebp + eax - 0x818], dl
mov ecx, dword [ebp - 0x824]
add ecx, 1
mov dword [ebp - 0x824], ecx
movzx edx, word [ebp - 0x14]
sar edx, 8
and edx, 0xff
mov eax, dword [ebp - 0x824]
mov byte [ebp + eax - 0x818], dl
mov ecx, dword [ebp - 0x824]
add ecx, 1
mov dword [ebp - 0x824], ecx
mov edx, dword [ebp - 0x14]
shr edx, 0x10
and edx, 0xff
mov eax, dword [ebp - 0x824]
mov byte [ebp + eax - 0x818], dl
mov ecx, dword [ebp - 0x824]
add ecx, 1
mov dword [ebp - 0x824], ecx
mov edx, dword [ebp - 0x824]
add edx, 3
cmp edx, 0x800
jl 0x40fef5
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x824]
push ecx
push 1
lea edx, [ebp - 0x818]
push edx
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
mov dword [ebp - 0x824], 0
jmp 0x40fe1a
jmp 0x40fdfc
cmp dword [ebp - 0x824], 0
jle 0x40ff25
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x824]
push ecx
push 1
lea edx, [ebp - 0x818]
push edx
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
mov eax, dword [ebp - 0x81c]
push eax
call dword [sym.imp.GDI32.dll_DeleteDC]
xor eax, eax
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.0042b913
mov esp, ebp
pop ebp
ret