Function at 0x479cb0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff74
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
call fcn.00405498
xor eax, eax
push ebp
push 0x479fd3
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp byte [eax + 0x39], 3
jne 0x479da8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov edx, dword [eax]
call dword [edx + 8]
mov eax, dword [ebp - 8]
call fcn.00409bc4
test al, al
je 0x479fbd
mov edx, 0x40
mov eax, dword [ebp - 8]
call fcn.00409ab8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x479fbd
lea edx, [ebp - 0x8c]
mov ecx, 0x30
mov eax, dword [ebp - 0xc]
call fcn.00409b10
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4d8]
shl eax, 2
call fcn.00402ee0
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x4d8]
shl ecx, 2
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0xc]
call fcn.00409b10
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4d8]
dec eax
test eax, eax
jl 0x479d92
inc eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
shl eax, 2
add eax, dword [ebp - 0x1c]
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov edx, dword [ebp - 0x14]
call fcn.004158e0
inc dword [ebp - 0x10]
dec dword [ebp - 0x2c]
jne 0x479d6e
mov eax, dword [ebp - 0x1c]
call fcn.00402efc
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x479fbd
mov eax, dword [ebp - 4]
cmp byte [eax + 0x39], 2
jne 0x479f04
mov dl, 1
mov eax, dword [0x413508]
call fcn.004041bc
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30]
call fcn.00409bc4
test al, al
je 0x479fbd
xor eax, eax
push ebp
push 0x479efd
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30]
mov edx, 0x40
call fcn.00409ab8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x479ee6
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetFileSize_1
mov edx, dword [ebp - 4]
mov dword [edx + 0x58], eax
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, 0x18
call fcn.00402ee0
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
xor ecx, ecx
mov edx, 0x18
call fcn.00403950
mov edx, dword [ebp - 0x10]
shl edx, 2
lea edx, [edx + edx*2]
add edx, 0xc
neg edx
mov ecx, 2
mov eax, dword [ebp - 0xc]
call fcn.00409b68
push 0
lea eax, [ebp - 0x24]
push eax
push 0xc
mov eax, dword [ebp - 0x20]
add eax, 0xc
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_ReadFile_1
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0xc], 0
jg 0x479e7d
mov edx, 0x18
mov eax, dword [ebp - 0x20]
call fcn.00402efc
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x28]
call fcn.004158e0
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0xc], 0x200
je 0x479e9c
inc dword [ebp - 0x10]
jmp 0x479e18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov edx, dword [eax]
call dword [edx + 8]
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 8]
dec eax
cmp eax, 0
jl 0x479ee6
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x28]
call fcn.00415a38
test eax, eax
je 0x479edd
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x28]
call fcn.00415a38
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
call fcn.004158e0
dec dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0xffffffff
jne 0x479eb6
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x479fbd
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle_1
ret
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov edx, dword [eax]
call dword [edx + 8]
mov eax, dword [ebp - 8]
call fcn.00409bc4
test al, al
je 0x479fbd
mov edx, 0x40
mov eax, dword [ebp - 8]
call fcn.00409ab8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x479fbd
lea edx, [ebp - 0x5c]
mov ecx, 0x30
mov eax, dword [ebp - 0xc]
call fcn.00409b10
mov eax, dword [ebp - 0x30]
shl eax, 2
call fcn.00402ee0
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x30]
shl ecx, 2
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0xc]
call fcn.00409b10
mov eax, dword [ebp - 0x30]
dec eax
test eax, eax
jl 0x479fac
inc eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x10], 0
mov eax, 8
call fcn.00402ee0
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
shl eax, 2
add eax, dword [ebp - 0x1c]
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov edx, dword [ebp - 0x14]
call fcn.004158e0
inc dword [ebp - 0x10]
dec dword [ebp - 0x2c]
jne 0x479f7b
mov eax, dword [ebp - 0x1c]
call fcn.00402efc
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x479fda
lea eax, [ebp - 8]
call fcn.00405018
ret