Function at 0x4052ca
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov dword [esp + 4], 0x8000
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._open
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x405326
mov dword [esp + 8], 0x100
mov dword [esp + 4], 0x8100
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._open
mov dword [ebp - 0x10], eax
mov dword [esp + 8], 4
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._read
mov dword [esp + 8], 4
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._read
mov dword [esp + 8], 4
lea eax, [ebp - 0x30]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._read
mov dword [ebp - 0x14], 1
jmp 0x4053c8
mov dword [esp], 0xd4
call sym._malloc
mov dword [ebp - 0x20], eax
mov dword [esp + 8], 0xd4
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._read
mov eax, dword [ebp - 0x20]
mov dword [eax + 0xd0], 0
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
mov dword [eax + 0xcc], edx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x14], eax
jbe 0x40537d
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x24]
mov dword [eax], edx
mov dword [ebp - 0x14], 1
jmp 0x405478
mov dword [esp], 0x14
call sym._malloc
mov dword [ebp - 0x1c], eax
mov dword [esp + 8], 0x14
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._read
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x10], 0
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
jmp 0x40542b
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xcc]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x405447
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._strcmp
test eax, eax
jne 0x40541f
cmp dword [ebp - 0x20], 0
je 0x40546a
mov eax, dword [ebp - 0x20]
mov edx, dword [eax + 0xd0]
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov dword [eax + 0xd0], edx
jmp 0x405475
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._free
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x14], eax
jbe 0x4053e4
mov dword [ebp - 0x14], 1
jmp 0x405553
mov dword [esp], 0x2c
call sym._malloc
mov dword [ebp - 0x18], eax
mov dword [esp + 8], 0x2c
mov eax, dword [ebp - 0x18]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._read
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0xc], 0
jmp 0x40551c
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xd0]
mov dword [ebp - 0x1c], eax
jmp 0x405504
mov eax, dword [ebp - 0x18]
lea edx, [eax + 3]
mov eax, dword [ebp - 0x1c]
add eax, 3
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._strcmp
test eax, eax
jne 0x4054fb
mov dword [ebp - 0xc], 1
jmp 0x405510
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x405510
cmp dword [ebp - 0xc], 0
je 0x4054d6
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xcc]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x405528
cmp dword [ebp - 0xc], 0
je 0x4054c8
cmp dword [ebp - 0xc], 0
je 0x405545
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax + 0x10]
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x28], edx
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov dword [eax + 0x10], edx
jmp 0x405550
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._free
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x30]
cmp dword [ebp - 0x14], eax
jbe 0x405490
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._close
call dbg.SaveSysData
mov eax, 1
leave
ret