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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52ab51
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x587978]
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 [0x587944]
mov dword [ebp - 0x30], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x587944
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 0x4e1207
push 0x104
lea ecx, [ebp - 0x40]
call fcn.00406e00
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.004eb8eb
add esp, 8
cmp eax, esi
jl 0x4e14f8
cmp eax, dword [ebx - 8]
jg 0x4e14f8
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 SysReAllocStringLen
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x4e12a7
call fcn.0040b2f0
cmp eax, esi
jge 0x4e12ac
mov edi, dword [ebp - 0x30]
push 0x533edc
mov ecx, edi
call fcn.00406730
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 0x4e12a3
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov eax, edi
jmp 0x4e1314
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 0x4e1335
call fcn.0040b2f0
xor edi, edi
cmp eax, edi
jge 0x4e1332
mov ecx, dword [ebp - 0x30]
push 0x533edc
call fcn.00406730
mov dword [ebp - 0x34], 1
mov byte [ebp - 4], 2
cmp esi, edi
je 0x4e12f2
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 0x4e1311
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.004eaf3b
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 0x4e135f
push 0xffffffffffffffff
push edi
lea ecx, [ebp - 0x2c]
call fcn.004dd2b0
jmp 0x4e136e
mov ecx, edi
sub ecx, eax
push 0
push ecx
lea ecx, [ebp - 0x2c]
call fcn.004dd740
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
jae 0x4e137a
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 0x4e1430
call fcn.0040b2f0
test eax, eax
jns 0x4e1439
mov eax, dword [0x587944]
mov edx, dword [eax + 0xc]
mov ecx, 0x587944
call edx
mov ecx, dword [ebp - 0x30]
add eax, 0x10
mov dword [ecx], eax
mov byte [ebp - 4], 0xa
call fcn.00406400
mov byte [ebp - 4], 9
mov dword [ebp - 0x34], 1
mov byte [ebp - 4], 4
cmp dword [ebp - 0x18], 0x10
jb 0x4e13e6
mov eax, dword [ebp - 0x2c]
push eax
call fcn.004ea9d3
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 0x4e1408
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 0x4e1311
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
jmp 0x4e1311
cmp dword [ebp - 0x44], edi
jne 0x4e13a5
test esi, esi
je 0x4e144b
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 0x4e1499
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 0x4e149d
mov esi, dword [eax + ecx + 0x98]
xor ecx, ecx
lea esp, [esp]
mov eax, ebx
cmp edx, 0x10
jae 0x4e148a
lea eax, [ebp - 0x2c]
cmp byte [eax + esi - 1], 0
jne 0x4e149d
add esi, 0xffffffff
adc ecx, 0xffffffff
jmp 0x4e1480
mov ecx, ebx
jmp 0x4e145d
cmp edx, 0x10
jb 0x4e14a7
mov dword [ebp - 0x44], ebx
jmp 0x4e14ad
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x64], edi
cmp edx, 0x10
jae 0x4e14b8
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.0040d960
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
jae 0x4e14f2
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x54], 0
ja 0x4e1502
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.004eb0e0
xor eax, eax
add esp, 0xc
cmp dword [ebx + esi - 5], eax
jbe 0x4e1536
mov edi, edi
cmp eax, dword [ebp - 0x54]
jae 0x4e14f8
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 0x4e1520
mov esi, dword [ebx + esi - 5]
cmp esi, dword [ebp - 0x54]
jb 0x4e1549
push 0x80070057
call fcn.00406170
mov ebx, dword [ebp - 0x30]
push edi
mov ecx, ebx
mov byte [esi + edi], 0
call fcn.00406730
mov dword [ebp - 0x34], 1
mov byte [ebp - 4], 9
xor esi, esi
cmp edi, esi
je 0x4e1572
push edi
call fcn.004eaf4a
add esp, 4
mov byte [ebp - 4], 4
cmp dword [ebp - 0x18], 0x10
jb 0x4e1588
mov eax, dword [ebp - 0x2c]
push eax
call fcn.004ea9d3
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 0x4e15ab
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 0x4e15cd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
jmp 0x4e1314