Function at 0x406740
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 8]
push eax
push 1
push 4
lea ecx, [ebp - 0x28]
push ecx
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 1
je 0x406772
xor eax, eax
jmp 0x406993
mov edx, dword [ebp + 8]
push edx
push 1
push 4
lea eax, [ebp - 4]
push eax
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 1
je 0x406797
xor eax, eax
jmp 0x406993
mov ecx, dword [ebp + 8]
push ecx
push 1
push 4
lea edx, [ebp - 0x1c]
push edx
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 1
je 0x4067bc
xor eax, eax
jmp 0x406993
mov eax, dword [ebp + 8]
push eax
push 1
push 4
lea ecx, [ebp - 0x18]
push ecx
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 1
je 0x4067e1
xor eax, eax
jmp 0x406993
mov edx, dword [ebp + 8]
push edx
push 1
push 4
lea eax, [ebp - 8]
push eax
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 1
je 0x406806
xor eax, eax
jmp 0x406993
mov ecx, dword [ebp + 8]
push ecx
push 1
push 4
lea edx, [ebp - 0x10]
push edx
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 1
je 0x40682b
xor eax, eax
jmp 0x406993
mov eax, dword [ebp + 8]
push eax
push 1
push 4
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 1
je 0x406850
xor eax, eax
jmp 0x406993
mov edx, dword [ebp + 8]
push edx
push 1
push 4
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 1
je 0x406875
xor eax, eax
jmp 0x406993
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x28]
push eax
call fcn.00405e40
add esp, 0x18
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 0x24], ecx
cmp dword [ebp - 0x10], 2
jne 0x4068e4
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 8]
push ecx
push 4
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0x14]
push eax
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x24]
cmp edx, dword [ecx + 8]
je 0x4068e2
xor eax, eax
jmp 0x406993
jmp 0x406917
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
add edx, 1
push edx
push 4
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x14]
push ecx
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
add eax, 1
cmp dword [ebp - 0x24], eax
je 0x406917
xor eax, eax
jmp 0x406993
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 8]
push eax
push 4
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x18]
push edx
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [eax + 8]
je 0x406946
xor eax, eax
jmp 0x406993
mov edx, dword [ebp - 0x14]
cmp dword [edx + 0x28], 0
jle 0x406983
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x28]
push ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0x1c]
push eax
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x24]
cmp edx, dword [ecx + 8]
je 0x406983
xor eax, eax
jmp 0x406993
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
mov eax, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret