Function at 0x40f760
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x85c
mov eax, dword [0x436924]
xor eax, ebp
mov dword [ebp - 0x34], eax
cmp dword [ebp + 8], 0
jne 0x40f795
push 0xe
push 0x340
push 0x430974
call fcn.0040b010
add esp, 0xc
or eax, 0xffffffff
jmp 0x40fc90
cmp dword [ebp + 0xc], 0
jne 0x40f7b7
push 0x15
push 0x344
push 0x43098c
call fcn.0040b010
add esp, 0xc
or eax, 0xffffffff
jmp 0x40fc90
mov dword [ebp - 0x24], 0
cmp dword [ebp - 0x24], 3
jge 0x40fa48
mov eax, dword [ebp + 0x10]
push eax
push 0x800
lea ecx, [ebp - 0x838]
push ecx
call dword [sym.imp.MSVCR90.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x40f801
push 0x16
push 0x34b
push 0x4309a4
call fcn.0040b010
add esp, 0xc
or eax, 0xffffffff
jmp 0x40fc90
lea edx, [ebp - 0x838]
mov dword [ebp - 0x30], edx
jmp 0x40f815
mov eax, dword [ebp - 0x30]
add eax, 1
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
movsx edx, byte [ecx]
test edx, edx
je 0x40f835
mov eax, dword [ebp - 0x30]
movsx ecx, byte [eax]
push ecx
call dword [sym.imp.MSVCR90.dll_isspace]
add esp, 4
test eax, eax
je 0x40f835
jmp 0x40f80c
mov edx, dword [ebp - 0x30]
movsx eax, byte [edx]
test eax, eax
je 0x40f84a
mov ecx, dword [ebp - 0x30]
movsx edx, byte [ecx]
cmp edx, 0x23
jne 0x40f84f
jmp 0x40f7c8
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x854], eax
cmp dword [ebp - 0x854], 0
je 0x40f87c
cmp dword [ebp - 0x854], 1
je 0x40f8c7
cmp dword [ebp - 0x854], 2
je 0x40f985
jmp 0x40fa43
push 2
push 0x4309bc
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.MSVCR90.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x40f8b0
push 0x16
push 0x357
push 0x4309c0
call fcn.0040b010
add esp, 0xc
or eax, 0xffffffff
jmp 0x40fc90
mov edx, dword [ebp - 0x24]
add edx, 1
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x30]
add eax, 2
mov dword [ebp - 0x30], eax
jmp 0x40f80a
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x2c], ecx
jmp 0x40f8d8
mov edx, dword [ebp - 0x2c]
add edx, 1
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
movsx ecx, byte [eax]
test ecx, ecx
je 0x40f8fa
mov edx, dword [ebp - 0x2c]
movsx eax, byte [edx]
cmp eax, 0x30
jl 0x40f8fa
mov ecx, dword [ebp - 0x2c]
movsx edx, byte [ecx]
cmp edx, 0x39
jg 0x40f8fa
jmp 0x40f8cf
mov eax, dword [ebp - 0x2c]
mov cl, byte [eax]
mov byte [ebp - 0x849], cl
mov edx, dword [ebp - 0x2c]
mov byte [edx], 0
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x30]
je 0x40f93f
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.MSVCR90.dll_atoi]
add esp, 4
mov dword [ebp - 0x858], eax
fild dword [ebp - 0x858]
fstp qword [ebp - 0x20]
fld qword [ebp - 0x20]
fcomp qword [0x42d390]
fnstsw ax
test ah, 0x41
jp 0x40f966
mov edx, dword [ebp - 0x2c]
mov al, byte [ebp - 0x849]
mov byte [edx], al
push 0x16
push 0x361
push 0x4309d8
call fcn.0040b010
add esp, 0xc
or eax, 0xffffffff
jmp 0x40fc90
mov ecx, dword [ebp - 0x2c]
mov dl, byte [ebp - 0x849]
mov byte [ecx], dl
mov eax, dword [ebp - 0x24]
add eax, 1
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x30], ecx
jmp 0x40f80a
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x2c], edx
jmp 0x40f996
mov eax, dword [ebp - 0x2c]
add eax, 1
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
movsx edx, byte [ecx]
test edx, edx
je 0x40f9b8
mov eax, dword [ebp - 0x2c]
movsx ecx, byte [eax]
cmp ecx, 0x30
jl 0x40f9b8
mov edx, dword [ebp - 0x2c]
movsx eax, byte [edx]
cmp eax, 0x39
jg 0x40f9b8
jmp 0x40f98d
mov ecx, dword [ebp - 0x2c]
mov dl, byte [ecx]
mov byte [ebp - 0x849], dl
mov eax, dword [ebp - 0x2c]
mov byte [eax], 0
mov ecx, dword [ebp - 0x2c]
cmp ecx, dword [ebp - 0x30]
je 0x40f9fd
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.MSVCR90.dll_atoi]
add esp, 4
mov dword [ebp - 0x85c], eax
fild dword [ebp - 0x85c]
fstp qword [ebp - 0x18]
fld qword [ebp - 0x18]
fcomp qword [0x42d390]
fnstsw ax
test ah, 0x41
jp 0x40fa24
mov eax, dword [ebp - 0x2c]
mov cl, byte [ebp - 0x849]
mov byte [eax], cl
push 0x16
push 0x36b
push 0x4309f0
call fcn.0040b010
add esp, 0xc
or eax, 0xffffffff
jmp 0x40fc90
mov edx, dword [ebp - 0x2c]
mov al, byte [ebp - 0x849]
mov byte [edx], al
mov ecx, dword [ebp - 0x24]
add ecx, 1
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x30], edx
jmp 0x40f80a
jmp 0x40f7be
push 0
mov eax, dword [0x43f01c]
push eax
push 1
fld qword [ebp - 0x18]
call fcn.0042b990
push eax
fld qword [ebp - 0x20]
call fcn.0042b990
push eax
call dword [sym.imp.GDI32.dll_CreateBitmap]
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x30], eax
mov edx, dword [ebp + 0xc]
cmp dword [edx + 0x30], 0
jne 0x40fa95
push 0x14
push 0x375
push 0x430a08
call fcn.0040b010
add esp, 0xc
or eax, 0xffffffff
jmp 0x40fc90
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
mov edx, dword [ecx + 0x8a0]
push edx
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov dword [ebp - 0x83c], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x30]
push ecx
mov edx, dword [ebp - 0x83c]
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x34], 0
mov ecx, dword [ebp + 0xc]
fld1
fstp qword [ecx + 0x28]
mov edx, dword [ebp + 0xc]
fld1
fstp qword [edx + 0x20]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov dword [eax + 8], edx
mov eax, dword [ebp + 8]
sub eax, dword [0x43f028]
cdq
mov ecx, 0x18
idiv ecx
mov edx, dword [ebp + 0xc]
mov dword [edx + 4], eax
mov eax, dword [ebp + 0xc]
add eax, 0x10
fld qword [ebp - 0x20]
fstp qword [eax]
fld qword [ebp - 0x18]
fstp qword [eax + 8]
mov dword [ebp - 0xc], 0
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x850], ecx
mov edx, dword [ebp - 0x850]
mov byte [ebp + edx - 0x838], 0
mov dword [ebp - 4], 0
jmp 0x40fb3f
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
fild dword [ebp - 4]
fcomp qword [ebp - 0x18]
fnstsw ax
test ah, 5
jp 0x40fc81
mov dword [ebp - 8], 0
jmp 0x40fb62
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
fild dword [ebp - 8]
fcomp qword [ebp - 0x20]
fnstsw ax
test ah, 5
jp 0x40fc7c
mov dword [ebp - 0x28], 0
jmp 0x40fb85
mov edx, dword [ebp - 0x28]
add edx, 1
mov dword [ebp - 0x28], edx
cmp dword [ebp - 0x28], 3
jge 0x40fc42
mov eax, dword [ebp - 0x850]
cmp eax, dword [ebp - 0xc]
jne 0x40fc16
mov ecx, dword [ebp + 0x10]
push ecx
push 0x7ff
push 1
lea edx, [ebp - 0x838]
push edx
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40fc0c
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.MSVCR90.dll_ferror]
add esp, 4
test eax, eax
je 0x40fbd6
mov dword [ebp - 0xc], 0xffffffff
mov ecx, dword [ebp - 0x83c]
push ecx
call dword [sym.imp.GDI32.dll_DeleteDC]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x30]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push 0x14
push 0x38a
push 0x430a20
call fcn.0040b010
add esp, 0xc
or eax, 0xffffffff
jmp 0x40fc90
mov dword [ebp - 0x850], 0
mov ecx, dword [ebp - 0x850]
movzx edx, byte [ebp + ecx - 0x838]
mov eax, dword [ebp - 0x28]
mov dword [ebp + eax*4 - 0x848], edx
mov ecx, dword [ebp - 0x850]
add ecx, 1
mov dword [ebp - 0x850], ecx
jmp 0x40fb7c
movzx edx, byte [ebp - 0x848]
movzx eax, byte [ebp - 0x844]
shl eax, 8
or edx, eax
movzx ecx, byte [ebp - 0x840]
shl ecx, 0x10
or edx, ecx
push edx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x83c]
push ecx
call dword [sym.imp.GDI32.dll_SetPixel]
jmp 0x40fb59
jmp 0x40fb36
mov edx, dword [ebp - 0x83c]
push edx
call dword [sym.imp.GDI32.dll_DeleteDC]
xor eax, eax
mov ecx, dword [ebp - 0x34]
xor ecx, ebp
call fcn.0042b913
mov esp, ebp
pop ebp
ret