Function at 0x402c92
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40c14b
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 0x402cd4
mov ecx, dword [ebp - 0x28]
call fcn.004064a0
mov dword [ebp - 0x4c], eax
jmp 0x402cdb
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 0x4012b4
mov edx, dword [ebp + 8]
push edx
call sub.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 0x402d43
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 0x402d35
push 1
mov ecx, dword [ebp - 0x2c]
call fcn.004063b0
mov dword [ebp - 0x50], eax
jmp 0x402d3c
mov dword [ebp - 0x50], 0
xor eax, eax
jmp 0x402f4e
push 0
push 0x3c
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
push eax
call sub.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 sub.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 sub.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 sub.MSVCRT.dll_fread
add esp, 0x10
cmp dword [ebp - 0x18], 0x4550
je 0x402de6
push 0x714
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
push edx
call sub.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 0x402dd8
push 1
mov ecx, dword [ebp - 0x34]
call fcn.004063b0
mov dword [ebp - 0x54], eax
jmp 0x402ddf
mov dword [ebp - 0x54], 0
xor eax, eax
jmp 0x402f4e
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
push eax
call sub.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 sub.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 sub.MSVCRT.dll_fseek
add esp, 0xc
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x10], 0
jmp 0x402e46
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 0x402ea2
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 sub.MSVCRT.dll_fread
add esp, 0x10
push 8
push 0x4012b8
mov eax, dword [ebp - 0x14]
add eax, 8
push eax
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x402ea0
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 sub.MSVCRT.dll_fseek
add esp, 0xc
jmp 0x402ea2
jmp 0x402e3d
mov edx, dword [ebp - 0x14]
cmp dword [edx + 0x18], 0
jne 0x402ef0
push 0x714
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push ecx
call sub.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 0x402ee5
push 1
mov ecx, dword [ebp - 0x3c]
call fcn.004063b0
mov dword [ebp - 0x58], eax
jmp 0x402eec
mov dword [ebp - 0x58], 0
xor eax, eax
jmp 0x402f4e
cmp dword [ebp + 0xc], 0
jne 0x402f4b
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 sub.MSVCRT.dll_fread
add esp, 0x10
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00402f5c
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