Function at 0x504cc0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5dcf80
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x62fda0]
xor eax, esp
mov dword [esp + 0x24], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x62fda0]
xor eax, esp
push eax
lea eax, [esp + 0x3c]
mov dword fs:[0], eax
mov edi, dword [esp + 0x4c]
mov esi, ecx
lea ecx, [esi + 0x40]
push edi
call fcn.005b7890
push edi
lea ecx, [esp + 0x24]
call fcn.005b7a20
xor ebx, ebx
push edi
lea ecx, [esp + 0x18]
mov dword [esp + 0x48], ebx
call fcn.005b7a20
push str..vf1
lea ecx, [esp + 0x24]
mov byte [esp + 0x48], 1
call fcn.005b78d0
push str..vf2
lea ecx, [esp + 0x18]
call fcn.005b78d0
cmp dword [esi + 0x14], ebx
jne 0x504d4b
cmp dword [esi + 0x4c], ebx
jne 0x504d4b
cmp dword [esi + 0x1c], ebx
je 0x504d7a
mov eax, dword [esi + 0x4c]
cmp eax, ebx
je 0x504d5f
push eax
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
mov dword [esi + 0x4c], ebx
mov eax, dword [esi + 0x50]
cmp eax, ebx
je 0x504d73
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov dword [esi + 0x50], ebx
mov ecx, esi
call fcn.005041b0
mov eax, dword [esp + 0x20]
mov edi, dword [sym.imp.MSVCR90.dll_fopen]
push 0x5f6040
push eax
call edi
add esp, 8
mov dword [esi + 0x14], eax
cmp eax, ebx
je 0x504e0c
mov ecx, dword [esp + 0x14]
push 0x5f6040
push ecx
call edi
add esp, 8
mov dword [esi + 0x4c], eax
cmp eax, ebx
je 0x504e0c
mov edi, dword [sym.imp.MSVCR90.dll_malloc]
mov eax, 0x400
push 0x450c
mov dword [esi + 0x20], 3
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov dword [esi + 0x38], ebx
mov dword [esi + 0x24], 0x1142
call edi
mov edx, dword [esi + 0x24]
mov dword [esi + 0x18], eax
lea eax, [edx*4 + 4]
push eax
call edi
mov ecx, dword [esi + 0x14]
mov ebp, dword [sym.imp.MSVCR90.dll_fread]
push ecx
push 2
lea edx, [esp + 0x3c]
push 1
push edx
mov dword [esi + 0x50], eax
call ebp
add esp, 0x18
cmp eax, 2
jae 0x504e32
mov ecx, esi
call fcn.00504f80
lea ecx, [esp + 0x14]
mov byte [esp + 0x44], bl
call fcn.005b7180
lea ecx, [esp + 0x20]
mov dword [esp + 0x44], 0xffffffff
call fcn.005b7180
or eax, 0xffffffff
jmp 0x504f06
mov eax, dword [esi + 0x4c]
push eax
push 2
lea ecx, [esp + 0x34]
push 1
push ecx
call ebp
add esp, 0x10
cmp eax, 2
jb 0x504e05
xor edi, edi
cmp dword [esi + 0x24], ebx
jle 0x504e96
mov edx, dword [esi + 0x14]
push edx
push 4
lea eax, [esp + 0x34]
push 1
push eax
call ebp
add esp, 0x10
cmp eax, 1
jb 0x504e05
movzx eax, byte [esp + 0x2f]
movzx ecx, byte [esp + 0x2e]
movzx edx, byte [esp + 0x2d]
shl eax, 8
or eax, ecx
movzx ecx, byte [esp + 0x2c]
shl eax, 8
or eax, edx
mov edx, dword [esi + 0x18]
shl eax, 8
or eax, ecx
mov dword [edx + edi*4], eax
inc edi
cmp edi, dword [esi + 0x24]
jl 0x504e50
xor edi, edi
cmp dword [esi + 0x24], ebx
jle 0x504ee3
mov eax, dword [esi + 0x4c]
push eax
push 4
lea ecx, [esp + 0x34]
push 1
push ecx
call ebp
add esp, 0x10
cmp eax, 1
jb 0x504f27
movzx eax, byte [esp + 0x2f]
movzx edx, byte [esp + 0x2e]
movzx ecx, byte [esp + 0x2d]
shl eax, 8
or eax, edx
movzx edx, byte [esp + 0x2c]
shl eax, 8
or eax, ecx
mov ecx, dword [esi + 0x50]
shl eax, 8
or eax, edx
mov dword [ecx + edi*4], eax
inc edi
cmp edi, dword [esi + 0x24]
jl 0x504e9d
mov esi, dword [esi + 0x20]
lea ecx, [esp + 0x14]
mov byte [esp + 0x44], bl
call fcn.005b7180
lea ecx, [esp + 0x20]
mov dword [esp + 0x44], 0xffffffff
call fcn.005b7180
mov eax, esi
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.005bd2c6
add esp, 0x34
ret 4
mov eax, dword [esi + 0x4c]
cmp eax, ebx
je 0x504f3b
push eax
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
mov dword [esi + 0x4c], ebx
mov eax, dword [esi + 0x50]
cmp eax, ebx
je 0x504f4f
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov dword [esi + 0x50], ebx
mov ecx, esi
call fcn.005041b0
lea ecx, [esp + 0x14]
mov byte [esp + 0x44], bl
call fcn.005b7180
lea ecx, [esp + 0x20]
mov dword [esp + 0x44], 0xffffffff
call fcn.005b7180
or eax, 0xffffffff
jmp 0x504f06