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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e1031
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x52de08]
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 eax, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x34], esi
mov edx, dword [0x52ddd4]
mov dword [ebp - 0x30], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x52ddd4
call eax
lea ebx, [eax + 0x10]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 4], 2
mov eax, dword [ebx - 8]
mov ecx, 1
sub ecx, dword [ebx - 4]
sub eax, 0x104
or eax, ecx
jge 0x4a0e77
push 0x104
lea ecx, [ebp - 0x40]
call fcn.00406e80
mov ebx, dword [ebp - 0x40]
push 0x104
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, dword [ebx - 8]
push eax
push ebx
call fcn.004ab44b
add esp, 8
cmp eax, esi
jl 0x4a1168
cmp eax, dword [ebx - 8]
jg 0x4a1168
xor ecx, ecx
mov dword [ebx - 0xc], eax
mov word [ebx + eax*2], cx
mov dword [ebp - 0x3c], esi
mov byte [ebp - 4], 3
mov dword [ebp - 0x38], esi
mov byte [ebp - 4], 4
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocString
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x4a0f17
call fcn.0040b660
cmp eax, esi
jge 0x4a0f1c
mov edi, dword [ebp - 0x30]
push 0x4ea06a
mov ecx, edi
call fcn.004068c0
mov dword [ebp - 0x34], 1
mov dword [ebp - 4], esi
add ebx, 0xfffffff0
lea edx, [ebx + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x4a0f13
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov eax, edi
jmp 0x4a0f84
mov dword [ebp - 0x3c], eax
mov esi, eax
lea ecx, [ebp - 0x5c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [ebp - 0x60], edi
cmp edi, 0xffffffff
jne 0x4a0fa5
call fcn.0040b660
xor edi, edi
cmp eax, edi
jge 0x4a0fa2
mov ecx, dword [ebp - 0x30]
push 0x4ea06a
call fcn.004068c0
mov dword [ebp - 0x34], 1
mov byte [ebp - 4], 2
cmp esi, edi
je 0x4a0f62
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x3c], edi
mov dword [ebp - 4], edi
add ebx, 0xfffffff0
lea edx, [ebx + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x4a0f81
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov eax, dword [ebp - 0x30]
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.004aaa9b
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x60]
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x1c]
cmp edi, eax
ja 0x4a0fcf
push 0xffffffffffffffff
push edi
lea ecx, [ebp - 0x2c]
call fcn.0049d090
jmp 0x4a0fde
mov ecx, edi
sub ecx, eax
push 0
push ecx
lea ecx, [ebp - 0x2c]
call fcn.0049d520
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
jae 0x4a0fea
lea eax, [ebp - 0x2c]
push 0
lea edx, [ebp - 0x44]
push edx
push edi
push eax
push esi
mov dword [ebp - 0x44], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4a10a0
call fcn.0040b660
test eax, eax
jns 0x4a10a9
mov eax, dword [0x52ddd4]
mov edx, dword [eax + 0xc]
mov ecx, 0x52ddd4
call edx
mov ecx, dword [ebp - 0x30]
add eax, 0x10
mov dword [ecx], eax
mov byte [ebp - 4], 0xa
call fcn.004064e0
mov byte [ebp - 4], 9
mov dword [ebp - 0x34], 1
mov byte [ebp - 4], 4
cmp dword [ebp - 0x18], 0x10
jb 0x4a1056
mov eax, dword [ebp - 0x2c]
push eax
call fcn.004aa533
add esp, 4
xor edi, edi
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], edi
mov byte [ebp - 0x2c], 0
mov byte [ebp - 4], 2
cmp esi, edi
je 0x4a1078
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x3c], edi
mov dword [ebp - 4], edi
add ebx, 0xfffffff0
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a0f81
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
jmp 0x4a0f81
cmp dword [ebp - 0x44], edi
jne 0x4a1015
test esi, esi
je 0x4a10bb
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x3c], 0
mov edx, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x2c]
mov eax, ebx
cmp edx, 0x10
jae 0x4a1109
lea eax, [ebp - 0x2c]
mov ecx, eax
mov eax, dword [eax + 0x3c]
mov esi, edi
xor edi, edi
mov dword [ebp - 0x44], edi
cmp dword [eax + ecx + 0x9c], edi
je 0x4a110d
mov esi, dword [eax + ecx + 0x98]
xor ecx, ecx
lea esp, [esp]
mov eax, ebx
cmp edx, 0x10
jae 0x4a10fa
lea eax, [ebp - 0x2c]
cmp byte [eax + esi - 1], 0
jne 0x4a110d
add esi, 0xffffffff
adc ecx, 0xffffffff
jmp 0x4a10f0
mov ecx, ebx
jmp 0x4a10cd
cmp edx, 0x10
jb 0x4a1117
mov dword [ebp - 0x44], ebx
jmp 0x4a111d
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x64], edi
cmp edx, 0x10
jae 0x4a1128
lea ebx, [ebp - 0x2c]
xor eax, eax
mov edi, esi
sub edi, dword [ebx + esi - 5]
mov dword [ebp - 0x64], eax
sub edi, 5
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov byte [ebp - 4], 0xd
mov ecx, dword [ebx + esi - 5]
inc ecx
push 0xffffffffffffffff
push ecx
lea ecx, [ebp - 0x58]
call fcn.0040e200
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
jae 0x4a1162
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x54], 0
ja 0x4a1172
push 0x80070057
call fcn.00406170
mov edx, dword [ebx + esi - 5]
push edx
add eax, edi
mov edi, dword [ebp - 0x58]
push eax
push edi
call fcn.004aac40
xor eax, eax
add esp, 0xc
cmp dword [ebx + esi - 5], eax
jbe 0x4a11a6
mov edi, edi
cmp eax, dword [ebp - 0x54]
jae 0x4a1168
mov ecx, dword [ebp - 0x44]
mov dl, byte [ecx + esi - 1]
xor byte [edi + eax], dl
inc eax
cmp eax, dword [ebx + esi - 5]
jb 0x4a1190
mov esi, dword [ebx + esi - 5]
cmp esi, dword [ebp - 0x54]
jb 0x4a11b9
push 0x80070057
call fcn.00406170
mov ebx, dword [ebp - 0x30]
push edi
mov ecx, ebx
mov byte [esi + edi], 0
call fcn.004068c0
mov dword [ebp - 0x34], 1
mov byte [ebp - 4], 9
xor esi, esi
cmp edi, esi
je 0x4a11e2
push edi
call fcn.004aaaaa
add esp, 4
mov byte [ebp - 4], 4
cmp dword [ebp - 0x18], 0x10
jb 0x4a11f8
mov eax, dword [ebp - 0x2c]
push eax
call fcn.004aa533
add esp, 4
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], esi
mov byte [ebp - 0x2c], 0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x3c]
cmp eax, esi
je 0x4a121b
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x3c], esi
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x40]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a123d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
jmp 0x4a0f84