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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x48b158
mov eax, dword fs:[0]
push eax
sub esp, 0x2d8
mov eax, dword [0x4a9070]
xor eax, esp
mov dword [esp + 0x2d0], eax
push ebx
push esi
push edi
mov eax, dword [0x4a9070]
xor eax, esp
push eax
lea eax, [esp + 0x2e8]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x20], eax
mov edi, ecx
push 0x4ab100
lea eax, [esp + 0x28]
mov dword [esp + 0x20], edi
call fcn.00435ff5
xor ebx, ebx
mov dword [esp + 0x2f0], ebx
mov eax, dword [0x4ab188]
cmp word [eax], bx
jne 0x4667e0
push edi
lea eax, [esp + 0x28]
push eax
call fcn.00436271
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push dword [esp + 0x3c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x46678e
or dword [esp + 0x2f0], 0xffffffff
lea ecx, [esp + 0x24]
call fcn.00436015
jmp 0x4668aa
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, ebx
jne 0x4667a5
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x466778
push edi
mov dword [esp + 0x1c], ebx
call fcn.0047c12c
pop ecx
push ebx
lea ecx, [esp + 0x1c]
push ecx
push edi
push eax
push esi
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x18], edi
je 0x466893
push dword [esp + 0x10]
call fcn.0047cf62
pop ecx
jmp 0x466778
push eax
lea eax, [esp + 0x28]
call fcn.00436026
cmp byte [0x4aa6c7], bl
je 0x4667fa
mov esi, dword [0x4ae320]
jmp 0x46680b
push 2
push ebx
push dword [esp + 0x2c]
call fcn.0044d584
add esp, 0xc
mov esi, eax
cmp esi, ebx
je 0x466778
lea eax, [esp + 0xac]
push eax
push esi
lea edx, [esp + 0x1c]
mov ecx, edi
call fcn.0044d5e2
pop ecx
pop ecx
test eax, eax
jne 0x466778
mov edi, dword [esp + 0x2d8]
cmp edi, ebx
je 0x466778
push edi
call fcn.0047c12c
pop ecx
push edi
push eax
push dword [esp + 0x1c]
mov dword [esp + 0x1c], eax
mov eax, esi
call fcn.0044d6b4
add esp, 0xc
cmp eax, ebx
je 0x466886
cmp eax, 0x600
je 0x466886
push dword [esp + 0x10]
call fcn.0047cf62
pop ecx
cmp byte [0x4aa6c7], bl
jne 0x466778
call fcn.0044d6e6
jmp 0x466778
cmp byte [0x4aa6c7], bl
jne 0x466893
call fcn.0044d6e6
or dword [esp + 0x2f0], 0xffffffff
lea ecx, [esp + 0x24]
call fcn.00436015
cmp dword [esp + 0x10], ebx
jne 0x466925
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x466921
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, ebx
jne 0x4668e2
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x466921
push edi
mov dword [esp + 0x18], ebx
call fcn.0047c12c
pop ecx
push ebx
lea ecx, [esp + 0x18]
push ecx
push edi
push eax
push esi
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x14], edi
je 0x46691b
push dword [esp + 0x10]
call fcn.0047cf62
pop ecx
mov dword [esp + 0x10], ebx
cmp dword [esp + 0x10], ebx
jne 0x466925
xor eax, eax
jmp 0x466941
push edi
push dword [esp + 0x14]
push dword [esp + 0x28]
call fcn.00466967
push dword [esp + 0x10]
mov esi, eax
call fcn.0047cf62
pop ecx
mov eax, esi
mov ecx, dword [esp + 0x2e8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2d0]
xor ecx, esp
call fcn.0046fab6
mov esp, ebp
pop ebp
ret 4