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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50645a
mov eax, dword fs:[0]
push eax
sub esp, 0xe4
mov eax, dword [0x564690]
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, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0xdc], 0
mov eax, dword [0x5641c0]
mov ecx, 0x5641c0
mov dword [ebp - 4], 0
mov dword [ebp - 0xc4], edi
mov dword [ebp - 0xf0], edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi], eax
mov eax, dword [esi]
mov dword [ebp - 4], 0
cmp dword [eax - 0xc], 0
mov dword [ebp - 0xdc], 1
je 0x40e1eb
mov ecx, 0x51661c
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40e16b
test dx, dx
je 0x40e167
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40e16b
add eax, 4
add ecx, 4
test dx, dx
jne 0x40e145
xor eax, eax
jmp 0x40e170
sbb eax, eax
or eax, 1
test eax, eax
sete al
test al, al
jne 0x40e1eb
lea eax, [ebp - 0xc8]
push eax
call fcn.0040d2b0
mov ecx, dword [eax]
xor eax, eax
add esp, 4
test ecx, ecx
setne al
mov dword [ebp - 0xdc], 3
test eax, eax
jne 0x40e1a9
push 0x80004005
call fcn.00402ec0
mov eax, dword [esi]
jmp 0x40e1b0
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40e1d6
test dx, dx
je 0x40e1d2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40e1d6
add eax, 4
add ecx, 4
test dx, dx
jne 0x40e1b0
xor eax, eax
jmp 0x40e1db
sbb eax, eax
or eax, 1
test eax, eax
sete al
mov byte [ebp - 0xbe], 0
test al, al
je 0x40e1f2
mov byte [ebp - 0xbe], 1
mov eax, dword [ebp - 0xdc]
or ebx, 0xffffffff
test al, 2
je 0x40e227
mov edx, dword [ebp - 0xc8]
and eax, 0xfffffffd
add edx, 0xfffffff0
mov dword [ebp - 0xdc], eax
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40e227
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xbe], 0
je 0x40e2cb
lea eax, [ebp - 0xc4]
push eax
call fcn.0040d2b0
add esp, 4
mov dword [ebp - 4], 1
mov ecx, dword [eax]
mov esi, dword [edi]
lea edx, [ecx - 0x10]
sub esi, 0x10
cmp edx, esi
je 0x40e2a1
cmp dword [esi + 0xc], 0
jl 0x40e296
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x40e296
push edx
call fcn.00405870
add esp, 4
mov dword [ebp - 0xc8], eax
mov ecx, ebx
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e28f
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0xc8]
add eax, 0x10
mov dword [edi], eax
jmp 0x40e2a1
push dword [ecx - 0xc]
push ecx
mov ecx, edi
call fcn.00409890
mov edx, dword [ebp - 0xc4]
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x40e6c4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40e6c4
push 0
push 0
push 3
push 0
push 0
push SysReAllocStringLen
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc8], eax
cmp eax, 0xffffffff
jne 0x40e308
lea eax, [ebp - 0xc4]
push eax
call fcn.0040d2b0
add esp, 4
mov dword [ebp - 4], 2
jmp 0x40e24a
lea ecx, [ebp - 0xe8]
push ecx
xorps xmm0, xmm0
push eax
movq qword [ebp - 0xe8], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x40e36d
lea eax, [ebp - 0xc4]
push eax
call fcn.0040d2b0
add esp, 4
mov dword [ebp - 4], 3
push eax
mov ecx, edi
call fcn.004025b0
mov edx, dword [ebp - 0xc4]
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x40e6b8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40e6b8
cmp dword [ebp - 0xe4], 0
je 0x40e38e
lea eax, [ebp - 0xc4]
push eax
call fcn.0040d2b0
add esp, 4
mov dword [ebp - 4], 4
jmp 0x40e33b
mov eax, dword [ebp - 0xe8]
test eax, eax
je 0x40e6b8
mov dword [ebp - 0xd8], 0
mov dword [ebp - 0xd4], 0
mov dword [ebp - 0xd0], 0
push eax
lea ecx, [ebp - 0xd8]
mov dword [ebp - 4], 5
call fcn.004134d0
mov esi, dword [ebp - 0xd8]
push 0
lea eax, [ebp - 0xec]
push eax
push dword [ebp - 0xe8]
mov dword [ebp - 0xec], 0
push esi
push dword [ebp - 0xc8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40e6ab
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0xbf]
push eax
lea eax, [ebp - 0xbd]
push eax
push esi
mov byte [ebp - 0xbd], 0
mov byte [ebp - 0xbf], 0
mov dword [ebp - 0xe0], 0
call fcn.0048ecd0
mov eax, dword [ebp - 0xe0]
add esp, 0x10
test eax, eax
jle 0x40e45d
add eax, esi
push eax
push esi
lea eax, [ebp - 0xcc]
push eax
lea ecx, [ebp - 0xd8]
call fcn.0040e8a0
mov esi, dword [ebp - 0xd8]
cmp byte [ebp - 0xbf], 0
mov edi, dword [ebp - 0xd4]
je 0x40e508
mov ecx, dword [0x565ae0]
lea eax, [ecx + 1]
imul eax, ecx
cdq
mov ecx, 0x16
idiv ecx
cmp edx, 7
jne 0x40e4ab
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov ecx, dword [0x565ae0]
mov edx, 7
test eax, eax
cmove ecx, edx
mov dword [0x565ae0], ecx
mov ecx, esi
cmp esi, edi
je 0x40e4c5
mov dl, byte [ecx]
mov bl, byte [ecx + 1]
mov byte [ecx + 1], dl
mov byte [ecx], bl
add ecx, 2
cmp ecx, edi
jne 0x40e4b1
or ebx, 0xffffffff
call fcn.0040e8f0
test al, al
jne 0x40e508
mov eax, dword [0x565ae0]
xor ecx, ecx
test eax, eax
je 0x40e500
xor esi, esi
jmp 0x40e4e0
mov ecx, eax
cdq
and ecx, 1
sub eax, edx
add esi, ecx
sar eax, 1
jne 0x40e4e0
mov dword [ebp - 0xcc], esi
mov esi, dword [ebp - 0xd8]
mov ecx, dword [ebp - 0xcc]
mov dword [0x565ae0], ecx
jmp 0x40e50e
mov ecx, dword [0x565ae0]
sub edi, esi
cmp byte [esi + edi - 1], 0
je 0x40e5d4
lea eax, [ecx + 1]
imul eax, ecx
cdq
mov ecx, 0x14
idiv ecx
cmp edx, 3
jne 0x40e569
push 0x28
call fcn.004e3b54
add esp, 4
mov ebx, eax
xor esi, esi
lea esp, [esp]
call fcn.004e5b54
add eax, dword [0x565ae0]
inc esi
mov dword [ebx + esi*4 - 4], eax
cmp esi, 0xa
jl 0x40e540
mov eax, dword [ebx + 0x24]
push ebx
mov dword [0x565ae0], eax
call fcn.004e5c83
add esp, 4
or ebx, 0xffffffff
inc edi
push edi
lea ecx, [ebp - 0xd8]
call fcn.004134d0
mov esi, dword [ebp - 0xd8]
mov byte [esi + edi - 1], 0
mov edx, dword [0x565ae0]
lea ecx, [edx + 1]
lea eax, [edx + 2]
imul eax, ecx
imul eax, edx
cdq
mov ecx, 0x14
idiv ecx
cmp edx, 3
jne 0x40e5ad
lea eax, [ebp - 0xbc]
push eax
call dword [sym.imp.KERNEL32.dll_GetTimeZoneInformation]
cmp byte [ebp - 0xbd], 0
je 0x40e642
inc edi
push edi
lea ecx, [ebp - 0xd8]
call fcn.004134d0
mov esi, dword [ebp - 0xd8]
mov byte [esi + edi - 1], 0
jmp 0x40e5f8
cmp byte [ebp - 0xbd], 0
je 0x40e642
lea eax, [edi + 2]
push eax
lea ecx, [ebp - 0xd8]
call fcn.004134d0
mov esi, dword [ebp - 0xd8]
mov word [esi + edi], 0
cmp byte [ebp - 0xbd], 0
je 0x40e642
push esi
lea ecx, [ebp - 0xcc]
call fcn.00401b70
mov edi, dword [ebp - 0xc4]
push eax
mov ecx, edi
mov byte [ebp - 4], 6
call fcn.004025b0
mov edx, dword [ebp - 0xcc]
add edx, 0xfffffff0
mov byte [ebp - 4], 5
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x40e6ab
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40e6ab
mov eax, dword [0x5641c0]
mov ecx, 0x5641c0
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xcc], eax
push esi
lea ecx, [ebp - 0xcc]
mov byte [ebp - 4], 7
call fcn.004026b0
mov edi, dword [ebp - 0xc4]
lea eax, [ebp - 0xcc]
push eax
mov ecx, edi
mov byte [ebp - 4], 8
call fcn.004025b0
mov edx, dword [ebp - 0xcc]
add edx, 0xfffffff0
mov byte [ebp - 4], 5
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x40e6a1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push edi
push edi
call fcn.0048d600
add esp, 8
test esi, esi
je 0x40e6b8
push esi
call fcn.004e48b8
add esp, 4
push dword [ebp - 0xc8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
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.004e50b4
mov esp, ebp
pop ebp
ret