Function at 0x492c80
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.00404c38
xor eax, eax
push ebp
push 0x492f9c
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp byte [eax + 0x39], 3
jne 0x492d77
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.00409bf4
test al, al
je 0x492f86
mov edx, 0x40
mov eax, dword [ebp - 8]
call fcn.004099d4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x492f86
lea edx, [ebp - 0x8c]
mov ecx, 0x30
mov eax, dword [ebp - 0xc]
call fcn.00409a98
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4d8]
shl eax, 2
call fcn.004027c4
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.00409a98
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4d8]
dec eax
test eax, eax
jl 0x492d62
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.0041af1c
inc dword [ebp - 0x10]
dec dword [ebp - 0x2c]
jne 0x492d3e
mov eax, dword [ebp - 0x1c]
call fcn.004027e4
mov eax, dword [ebp - 0xc]
call fcn.00409b70
jmp 0x492f86
mov eax, dword [ebp - 4]
cmp byte [eax + 0x39], 2
jne 0x492ece
mov dl, 1
mov eax, dword [0x4184b0]
call fcn.00403984
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30]
call fcn.00409bf4
test al, al
je 0x492f86
xor eax, eax
push ebp
push 0x492ec7
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30]
mov edx, 0x40
call fcn.004099d4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x492eb0
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.004027c4
mov dword [ebp - 0x20], eax
mov edx, 0x18
mov eax, dword [ebp - 0x20]
call fcn.0040786c
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.00409b08
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 0x492e4a
mov edx, 0x18
mov eax, dword [ebp - 0x20]
call fcn.004027e4
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x28]
call fcn.0041af1c
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0xc], 0x200
je 0x492e66
inc dword [ebp - 0x10]
jmp 0x492de7
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 0x492eb0
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x28]
call fcn.0041b11c
test eax, eax
je 0x492ea7
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x28]
call fcn.0041b11c
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
call fcn.0041af1c
dec dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0xffffffff
jne 0x492e80
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x492f86
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.00409bf4
test al, al
je 0x492f86
mov edx, 0x40
mov eax, dword [ebp - 8]
call fcn.004099d4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x492f86
lea edx, [ebp - 0x5c]
mov ecx, 0x30
mov eax, dword [ebp - 0xc]
call fcn.00409a98
mov eax, dword [ebp - 0x30]
shl eax, 2
call fcn.004027c4
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.00409a98
mov eax, dword [ebp - 0x30]
dec eax
test eax, eax
jl 0x492f76
inc eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x10], 0
mov eax, 8
call fcn.004027c4
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.0041af1c
inc dword [ebp - 0x10]
dec dword [ebp - 0x2c]
jne 0x492f45
mov eax, dword [ebp - 0x1c]
call fcn.004027e4
mov eax, dword [ebp - 0xc]
call fcn.00409b70
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x492fa3
lea eax, [ebp - 8]
call fcn.00404788
ret