Function at 0x500020
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
mov byte [ebp - 5], dl
mov dword [ebp - 4], eax
mov byte [ebp - 6], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
call fcn.00409770
test al, al
je 0x5001ec
cmp byte [ebp - 5], 0
je 0x50005e
xor edx, edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
call fcn.004095e0
mov edx, dword [ebp - 4]
mov dword [edx + 8], eax
jmp 0x500074
mov edx, 2
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
call fcn.004095e0
mov edx, dword [ebp - 4]
mov dword [edx + 8], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 0
jl 0x50023f
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
push eax
call sub.kernel32.dll_GetFileSize
mov edx, dword [ebp - 4]
mov dword [edx + 0x40], eax
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.004096bc
mov eax, dword [ebp - 4]
lea edx, [eax + 0xd]
mov ecx, 0x20
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.00409664
mov al, byte [0x539de8]
mov edx, dword [ebp - 4]
mov byte [edx + 0xc], al
mov eax, dword [ebp - 4]
add eax, 0xc
mov edx, 0x539de8
xor ecx, ecx
mov cl, byte [eax]
inc ecx
call fcn.00402f44
jne 0x50023f
mov eax, dword [ebp - 4]
lea edx, [eax + 0x30]
mov ecx, 4
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.00409664
mov eax, dword [ebp - 4]
lea edx, [eax + 0x34]
mov ecx, 4
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.00409664
xor ecx, ecx
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.004096bc
mov eax, dword [ebp - 4]
lea edx, [eax + 0x38]
mov ecx, 4
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.00409664
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
push eax
mov eax, dword [ebp - 4]
add eax, 0x3c
mov ecx, 1
mov edx, dword [0x4fed58]
call fcn.00405994
add esp, 4
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
add edx, 4
xor ecx, ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.004096bc
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
dec eax
test eax, eax
jl 0x5001a8
inc eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x3c]
lea edx, [edx + eax*4]
mov ecx, 4
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.00409664
inc dword [ebp - 0xc]
dec dword [ebp - 0x10]
jne 0x500181
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
dec eax
test eax, eax
jl 0x5001e6
inc eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x3c]
lea edx, [edx + eax*4 + 4]
mov ecx, 0x10
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.00409664
inc dword [ebp - 0xc]
dec dword [ebp - 0x10]
jne 0x5001be
mov byte [ebp - 6], 1
jmp 0x50023f
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
call fcn.00409638
mov edx, dword [ebp - 4]
mov dword [edx + 8], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 0
jl 0x50023f
mov edx, 0x539de9
mov ecx, 0x20
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.00409690
mov eax, dword [ebp - 4]
lea edx, [eax + 0x30]
mov ecx, 4
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.00409690
mov eax, dword [ebp - 4]
mov dword [eax + 0x40], 0x24
mov byte [ebp - 6], 1
cmp byte [ebp - 6], 0
jne 0x500259
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 0
jl 0x500259
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.00409700
mov al, byte [ebp - 6]
mov esp, ebp
pop ebp
ret