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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a0b81
mov eax, dword fs:[0]
push eax
sub esp, 0x1a8
mov eax, dword [0x4c90b4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov ebx, ecx
mov dword [ebp - 0x1b0], ebx
lea eax, [ebp - 0x94]
xor esi, esi
push 0xffffffffffffffff
push dword [0x4c9a80]
mov dword [ebp - 0x98], eax
lea ecx, [ebp - 0x98]
xor eax, eax
mov word [ebp - 0x94], ax
call fcn.00404a40
mov dword [ebp - 4], esi
mov eax, dword [0x4c9b08]
cmp word [eax], si
je 0x40abd7
cmp byte [ebp + 8], 0
je 0x40aad0
cmp byte [0x4cc57c], 0
je 0x40aa2e
mov ebx, dword [0x4cc570]
jmp 0x40aa9c
lea eax, [ebp - 0x11c]
push 0xffffffffffffffff
push dword [0x4c9a80]
mov dword [ebp - 0x120], eax
lea ecx, [ebp - 0x120]
xor eax, eax
mov word [ebp - 0x11c], ax
call fcn.00404a40
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x120]
push dword [0x4c9c18]
call fcn.00404910
mov ecx, dword [ebp - 0x120]
xor edx, edx
push 2
call fcn.004128c0
mov ebx, eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x120]
lea ecx, [ebp - 0x11c]
add esp, 4
cmp eax, ecx
je 0x40aa9c
push eax
call fcn.00491497
add esp, 4
test ebx, ebx
je 0x40aad0
mov ecx, dword [ebp - 0x1b0]
mov edx, edi
push ebx
push 0
push 0
call fcn.0040acb0
add esp, 0xc
mov esi, eax
cmp byte [0x4cc57c], 0
jne 0x40ac6c
mov ecx, ebx
call fcn.00412a60
jmp 0x40ac6c
cmp byte [0x4cc57c], 0
je 0x40aaef
mov eax, dword [0x4cc574]
mov ebx, dword [0x4cc578]
mov dword [ebp - 0x1ac], eax
jmp 0x40ab94
push dword [0x4c9b08]
lea ecx, [ebp - 0x98]
call fcn.00404910
mov ecx, dword [ebp - 0x98]
xor edx, edx
push 2
call fcn.004128c0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40aca3
lea eax, [ebp - 0x1a4]
push 0xffffffffffffffff
push dword [0x4c9a80]
mov dword [ebp - 0x1a8], eax
lea ecx, [ebp - 0x1a8]
xor eax, eax
mov word [ebp - 0x1a4], ax
call fcn.00404a40
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1a8]
push dword [0x4c9b90]
call fcn.00404910
mov ecx, dword [ebp - 0x1a8]
xor edx, edx
push 2
call fcn.004128c0
mov byte [ebp - 4], 0
lea edx, [ebp - 0x1a4]
mov ecx, dword [ebp - 0x1a8]
add esp, 4
mov dword [ebp - 0x1ac], eax
cmp ecx, edx
je 0x40ab94
push ecx
call fcn.00491497
mov eax, dword [ebp - 0x1ac]
add esp, 4
test ebx, ebx
je 0x40aca3
mov ecx, dword [ebp - 0x1b0]
mov edx, edi
push 0
push eax
push ebx
call fcn.0040acb0
add esp, 0xc
mov esi, eax
cmp byte [0x4cc57c], 0
jne 0x40abd1
mov ecx, ebx
call fcn.00412a60
mov ecx, dword [ebp - 0x1ac]
test ecx, ecx
je 0x40abd1
call fcn.00412a60
mov ebx, dword [ebp - 0x1b0]
cmp dword [edi], 0
jne 0x40ac6c
test ebx, ebx
je 0x40abf0
push ebx
lea ecx, [ebp - 0x98]
call fcn.00404910
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push dword [ebp - 0x98]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40ac6c
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x40ac65
push esi
mov dword [ebp - 0x1ac], 0
call fcn.00487e40
add esp, 4
mov dword [edi], eax
lea ecx, [ebp - 0x1ac]
push 0
push ecx
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x1ac], esi
je 0x40ac65
push dword [edi]
call fcn.00487e49
add esp, 4
mov dword [edi], 0
xor esi, esi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x98]
lea ecx, [ebp - 0x94]
cmp eax, ecx
je 0x40ac85
push eax
call fcn.00491497
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00487e4e
mov esp, ebp
pop ebp
xor esi, esi
jmp 0x40ac6c