Function at 0x4df944
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x30
push ebx
push esi
mov esi, ecx
xor eax, eax
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x2c], eax
push edi
xor ebx, ebx
mov dword [esp + 0x34], eax
push ecx
mov ecx, esi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x3c], eax
call fcn.004df7c0
mov edi, eax
cmp edi, ebx
jne 0x4df979
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x30
ret 4
cmp dword [0x67a7f0], 0x1a
jl 0x4df9b7
movsx edx, word [esi + 0x92]
mov ecx, dword [0x67a8cc]
push ebx
lea eax, [edi + edx*8 + 2]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
mov edx, dword [0x67a8cc]
lea eax, [esi + 0x94]
push edx
push 1
push 2
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
mov cl, byte [esi + 0x94]
push ebp
shr ecx, 4
and ecx, 3
mov ebp, 3
sub ebp, ecx
lea edx, [esi + 0x4f4]
mov dword [0x5888bc], edx
lea edx, [esi + 0x8c]
lea eax, [esp + ebp*4 + 0x30]
mov dword [esp + 0x20], ebx
movsx ecx, word [esi + 0x92]
mov dword [esp + 0x1c], eax
mov dword [eax], edi
xor eax, eax
xor edi, edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x10], edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x2c], eax
lea eax, [esp + ebp*4 + 0x20]
mov dword [esp + 0x18], eax
mov dword [eax], ecx
mov eax, dword [esp + 0x44]
movsx ecx, word [eax]
push ecx
call fcn.004e0500
add esp, 4
cmp eax, 0xffffffff
je 0x4dfa8e
push eax
call fcn.004e0510
add esp, 4
test eax, eax
jle 0x4dfa8e
cmp edi, ebp
lea ebx, [edi*4]
jl 0x4dfa44
add ebx, 4
mov edx, dword [0x67a8cc]
add eax, 0x22
push 0
push eax
push edx
call dword [sym.imp.MSVCRT.dll_fseek]
mov eax, dword [0x67a8cc]
lea edi, [esp + ebx + 0x2c]
push eax
push 1
push 2
push edi
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [0x67a8cc]
push ecx
call dword [sym.imp.MSVCRT.dll_ftell]
mov dx, word [edi]
mov edi, dword [esp + 0x30]
add esp, 0x20
add word [esi + 0x92], dx
mov dword [esp + ebx + 0x30], eax
mov edx, dword [esp + 0x44]
mov eax, 2
inc edi
add edx, eax
cmp edi, 3
mov dword [esp + 0x10], edi
mov dword [esp + 0x44], edx
jl 0x4dfa14
mov edi, dword [esi + 8]
push esi
or edi, eax
mov dword [esi + 8], edi
call fcn.004e04e0
xor ebx, ebx
add esp, 4
cmp word [esi + 0x92], bx
je 0x4dfb8d
lea eax, [esp + 0x10]
lea ecx, [esp + 0x10]
xor edi, edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x44], edi
mov eax, dword [esp + edi + 0x20]
test eax, eax
je 0x4dfb57
mov edx, dword [esp + edi + 0x30]
mov eax, dword [0x67a8cc]
push 0
push edx
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
mov ecx, dword [esp + edi + 0x2c]
add esp, 0xc
shl ecx, 3
push ecx
mov ecx, 0x6d07d8
call fcn.004bb1f0
mov edx, dword [0x67a8cc]
mov ebp, eax
mov eax, dword [esp + edi + 0x20]
push edx
push eax
push 8
push ebp
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [esp + 0x54]
mov edi, ebx
add esp, 0x10
mov edx, dword [esp + ecx + 0x20]
mov ecx, esi
add edi, edx
lea edx, [esp + 0x10]
push edx
push edi
push ebx
push ebp
call fcn.004dafd0
push ebp
mov ecx, 0x6d07d8
mov ebx, edi
call fcn.004bb220
mov edi, dword [esp + 0x44]
add edi, 4
cmp edi, 0x10
mov dword [esp + 0x44], edi
jl 0x4dfae1
mov edi, dword [esp + 0x10]
lea eax, [esp + 0x10]
cmp eax, edi
je 0x4dfb8d
lea ecx, [edi - 0x50]
mov edi, dword [edi]
test ecx, ecx
je 0x4dfb85
lea edx, [esi + 0x58]
push edx
call fcn.0041cd10
lea eax, [esp + 0x10]
cmp eax, edi
jne 0x4dfb73
mov eax, dword [0x67a7f0]
pop ebp
cmp eax, 6
jl 0x4dfc27
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 0
mov edx, dword [ecx]
mov ecx, dword [eax]
mov eax, dword [0x67a8cc]
mov byte [esp + 0x44], 0
lea edx, [ecx + edx*8]
push edx
push eax
call edi
mov ecx, dword [0x67a8cc]
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push ecx
push 1
lea edx, [esp + 0x54]
push 1
push edx
call ebx
mov al, byte [esp + 0x5c]
add esp, 0x1c
test al, al
je 0x4dfbec
mov eax, dword [esi + 8]
or al, 4
mov dword [esi + 8], eax
cmp dword [0x67a7f0], 0x1a
jl 0x4dfc27
mov eax, dword [0x67a8cc]
push 1
push 1
push eax
call edi
mov ecx, dword [0x67a8cc]
lea edi, [esi + 0x94]
push ecx
push 1
push 2
push edi
call ebx
mov al, byte [edi]
add esp, 0x1c
test al, 4
je 0x4dfc27
mov eax, dword [esi + 8]
or ah, 1
mov dword [esi + 8], eax
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xa8]
mov ax, word [esi + 0x8a]
cmp ax, word [0x593ff8]
jne 0x4dfc74
mov ax, word [0x593ffa]
test ax, ax
jle 0x4dfc74
movsx ecx, ax
lea ebx, [esi + 0x58]
mov dword [esi + 0x4f0], ecx
mov edi, dword [ebx]
cmp ebx, edi
je 0x4dfc74
mov eax, dword [esi + 0x4f0]
mov edx, dword [edi - 0x50]
lea ecx, [edi - 0x50]
push eax
call dword [edx + 0x60]
mov edi, dword [edi]
cmp ebx, edi
jne 0x4dfc5e
mov ecx, esi
call fcn.004df900
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x10]
mov ecx, esi
call fcn.004dfd90
mov ecx, esi
call fcn.004dff30
push 0x102
push esi
call fcn.0047e020
add esp, 8
mov ecx, esi
call fcn.004dd780
mov eax, dword [esi + 8]
mov ecx, esi
and al, 0xfd
mov dword [esi + 8], eax
mov dword [0x5888bc], 0
call fcn.004e0320
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x30
ret 4