Function at 0x402cd6
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40b09b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4c
push 0x74
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], 0
cmp dword [ebp - 0x28], 0
je 0x402d18
mov ecx, dword [ebp - 0x28]
call fcn.00406520
mov dword [ebp - 0x4c], eax
jmp 0x402d1f
mov dword [ebp - 0x4c], 0
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x14], ecx
push 0x4013d4
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov ecx, dword [ebp - 0x14]
mov dword [ecx], eax
mov edx, dword [ebp - 0x14]
cmp dword [edx], 0
jne 0x402d88
push 0x6e
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x2c], ecx
cmp dword [ebp - 0x2c], 0
je 0x402d7a
push 1
mov ecx, dword [ebp - 0x2c]
call fcn.00406430
mov dword [ebp - 0x50], eax
jmp 0x402d81
mov dword [ebp - 0x50], 0
xor eax, eax
jmp 0x402fa0
push 0
push 0x3c
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
push edx
push 1
push 4
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
push 0
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
push edx
push 1
push 4
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp dword [ebp - 0x18], 0x4550
je 0x402e30
push 0x714
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x34], ecx
cmp dword [ebp - 0x34], 0
je 0x402e22
push 1
mov ecx, dword [ebp - 0x34]
call fcn.00406430
mov dword [ebp - 0x54], eax
jmp 0x402e29
mov dword [ebp - 0x54], 0
xor eax, eax
jmp 0x402fa0
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
push eax
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 4
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
push eax
push 1
push 0x14
mov ecx, dword [ebp - 0x14]
add ecx, 0x30
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
push 1
mov edx, dword [ebp - 0x14]
xor eax, eax
mov ax, word [edx + 0x40]
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
push edx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x10], 0
jmp 0x402e93
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x14]
xor edx, edx
mov dx, word [ecx + 0x32]
cmp dword [ebp - 0x10], edx
jge 0x402ef2
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push ecx
push 1
push 0x28
mov edx, dword [ebp - 0x14]
add edx, 8
push edx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
push 8
push 0x4013d8
mov eax, dword [ebp - 0x14]
add eax, 8
push eax
call dword [sym.imp.MSVCRT.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x402ef0
push 0
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x1c]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
jmp 0x402ef2
jmp 0x402e8a
mov edx, dword [ebp - 0x14]
cmp dword [edx + 0x18], 0
jne 0x402f41
push 0x714
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x402f36
push 1
mov ecx, dword [ebp - 0x3c]
call fcn.00406430
mov dword [ebp - 0x58], eax
jmp 0x402f3d
mov dword [ebp - 0x58], 0
xor eax, eax
jmp 0x402fa0
cmp dword [ebp + 0xc], 0
jne 0x402f9d
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x18]
push edx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x18]
push ecx
push 1
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00402fae
add esp, 8
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 0x48]
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret