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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5127ca
mov eax, dword fs:[0]
push eax
sub esp, 0xae8
mov eax, dword [0x577680]
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 - 0xad8], 0
mov eax, dword [0x5771f0]
mov ecx, 0x5771f0
mov dword [ebp - 4], 0
mov dword [ebp - 0xac0], edi
mov dword [ebp - 0xaf4], edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0xad8], 1
call fcn.00413b60
test al, al
jne 0x413391
mov eax, dword [0x578ad4]
mov ecx, 1
test eax, eax
cmove eax, ecx
mov dword [0x578ad4], eax
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
je 0x413443
mov ecx, 0x52e4a0
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4133c8
test dx, dx
je 0x4133c4
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4133c8
add eax, 4
add ecx, 4
test dx, dx
jne 0x4133a2
xor eax, eax
jmp 0x4133cd
sbb eax, eax
or eax, 1
test eax, eax
sete al
test al, al
jne 0x413443
lea eax, [ebp - 0xab8]
push eax
call fcn.00417130
mov ecx, dword [eax]
xor eax, eax
add esp, 4
test ecx, ecx
setne al
mov dword [ebp - 0xad8], 3
test eax, eax
jne 0x413406
push 0x80004005
call fcn.004030e0
mov eax, dword [esi]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41342e
test dx, dx
je 0x41342a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41342e
add eax, 4
add ecx, 4
test dx, dx
jne 0x413408
xor eax, eax
jmp 0x413433
sbb eax, eax
or eax, 1
test eax, eax
sete al
mov byte [ebp - 0xab9], 0
test al, al
je 0x41344a
mov byte [ebp - 0xab9], 1
mov eax, dword [ebp - 0xad8]
or ebx, 0xffffffff
test al, 2
je 0x41347f
mov edx, dword [ebp - 0xab8]
and eax, 0xfffffffd
add edx, 0xfffffff0
mov dword [ebp - 0xad8], eax
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x41347f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xab9], 0
je 0x413523
lea eax, [ebp - 0xab8]
push eax
call fcn.00417130
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 0x4134f9
cmp dword [esi + 0xc], 0
jl 0x4134ee
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x4134ee
push edx
call fcn.004056f0
add esp, 4
mov dword [ebp - 0xac0], eax
mov ecx, ebx
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4134e7
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0xac0]
add eax, 0x10
mov dword [edi], eax
jmp 0x4134f9
push dword [ecx - 0xc]
push ecx
mov ecx, edi
call fcn.0040c730
mov edx, dword [ebp - 0xab8]
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x413931
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x413931
push 0
push 0
push 3
push 0
push 0
push SysReAllocStringLen
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0xaf0], esi
cmp esi, 0xffffffff
jne 0x413562
lea eax, [ebp - 0xab8]
push eax
call fcn.00417130
add esp, 4
mov dword [ebp - 4], 2
jmp 0x4134a2
lea eax, [ebp - 0xae8]
push eax
xorps xmm0, xmm0
push esi
movq qword [ebp - 0xae8], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x4135c7
lea eax, [ebp - 0xac0]
push eax
call fcn.00417130
add esp, 4
mov dword [ebp - 4], 3
push eax
mov ecx, edi
call fcn.004026b0
mov edx, dword [ebp - 0xac0]
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x41392a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x41392a
cmp dword [ebp - 0xae4], 0
je 0x4135e8
lea eax, [ebp - 0xac0]
push eax
call fcn.00417130
add esp, 4
mov dword [ebp - 4], 4
jmp 0x413595
mov eax, dword [ebp - 0xae8]
test eax, eax
je 0x41392a
mov dword [ebp - 0xad4], 0
mov dword [ebp - 0xad0], 0
mov dword [ebp - 0xacc], 0
push eax
lea ecx, [ebp - 0xad4]
mov dword [ebp - 4], 5
call fcn.0041bc60
mov ebx, dword [ebp - 0xad4]
push 0
lea eax, [ebp - 0xaec]
push eax
push dword [ebp - 0xae8]
mov dword [ebp - 0xaec], 0
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x413668
test ebx, ebx
je 0x41392a
push ebx
call fcn.004f03fe
add esp, 4
jmp 0x41392a
lea eax, [ebp - 0xae0]
push eax
lea eax, [ebp - 0xaba]
push eax
lea eax, [ebp - 0xab1]
push eax
push ebx
mov byte [ebp - 0xab1], 0
mov byte [ebp - 0xaba], 0
mov dword [ebp - 0xae0], 0
call fcn.00416c50
mov eax, dword [ebp - 0xae0]
add esp, 0x10
test eax, eax
jle 0x4136c4
add eax, ebx
push eax
push ebx
lea eax, [ebp - 0xab8]
push eax
lea ecx, [ebp - 0xad4]
call fcn.00413a80
mov ebx, dword [ebp - 0xad4]
cmp byte [ebp - 0xaba], 0
mov edi, dword [ebp - 0xad0]
mov dword [ebp - 0xac4], edi
je 0x41378d
mov ecx, ebx
cmp ebx, edi
je 0x4136f4
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 0x4136e3
call fcn.00413ad0
test al, al
jne 0x41378d
xor eax, eax
mov dword [ebp - 0xac8], eax
lea esi, [ebp - 0xab0]
nop
xor ecx, ecx
mov dword [ebp - 0xadc], ecx
mov dword [ebp - 0xab8], esi
mov edi, edi
mov esi, dword [0x578ad4]
lea ebx, [ecx + 1]
lea ecx, [eax + 1]
mov eax, esi
cdq
idiv ecx
mov eax, esi
mov ecx, esi
sub ecx, dword [ebp - 0xac8]
mov esi, dword [ebp - 0xab8]
mov edi, edx
cdq
imul edi, ecx
idiv ebx
add edi, eax
sub edi, dword [ebp - 0xadc]
push edi
push 0x52a4e0
call fcn.004f20c4
mov eax, dword [ebp - 0xac8]
mov ecx, ebx
add esi, 4
add esp, 8
mov dword [ebp - 0xadc], ecx
mov dword [ebp - 0xab8], esi
cmp ecx, 0x18
jl 0x413720
inc eax
mov dword [ebp - 0xac8], eax
cmp eax, 0x19
jl 0x413710
mov edi, dword [ebp - 0xac4]
mov esi, dword [ebp - 0xad4]
sub edi, esi
cmp byte [esi + edi - 1], 0
je 0x41383a
inc edi
push edi
lea ecx, [ebp - 0xad4]
mov dword [ebp - 0xac4], edi
call fcn.0041bc60
mov edx, dword [0x578ad4]
lea ecx, [edx + 1]
lea eax, [edx + 2]
imul eax, ecx
imul eax, edx
cdq
mov ecx, 3
idiv ecx
cmp edx, 2
jne 0x4137ed
mov edi, dword [0x578ad4]
xor esi, esi
mov ebx, edi
lea esp, [esp]
inc esi
dec ebx
cmp esi, 0x50
jb 0x4137e0
mov edi, dword [ebp - 0xac4]
mov esi, dword [ebp - 0xad4]
mov byte [esi + edi - 1], 0
cmp byte [ebp - 0xab1], 0
je 0x413819
inc edi
push edi
lea ecx, [ebp - 0xad4]
call fcn.0041bc60
mov esi, dword [ebp - 0xad4]
mov byte [esi + edi - 1], 0
call fcn.0041bc10
test al, al
jne 0x41385e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0x50
div ecx
inc edx
mov dword [0x578ad4], edx
jmp 0x41385e
cmp byte [ebp - 0xab1], 0
je 0x4138ab
lea eax, [edi + 2]
push eax
lea ecx, [ebp - 0xad4]
call fcn.0041bc60
mov esi, dword [ebp - 0xad4]
mov word [esi + edi], 0
cmp byte [ebp - 0xab1], 0
je 0x4138ab
push esi
lea ecx, [ebp - 0xab8]
call fcn.00401c30
mov edi, dword [ebp - 0xac0]
push eax
mov ecx, edi
mov byte [ebp - 4], 6
call fcn.004026b0
mov edx, dword [ebp - 0xab8]
add edx, 0xfffffff0
mov byte [ebp - 4], 5
lea eax, [edx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x413917
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x413917
mov eax, dword [0x5771f0]
mov ecx, 0x5771f0
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xac4], eax
push esi
lea ecx, [ebp - 0xac4]
mov byte [ebp - 4], 7
call fcn.004027b0
mov edi, dword [ebp - 0xac0]
lea eax, [ebp - 0xac4]
push eax
mov ecx, edi
mov byte [ebp - 4], 8
call fcn.004026b0
mov edx, dword [ebp - 0xac4]
add edx, 0xfffffff0
mov byte [ebp - 4], 5
lea eax, [edx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x41390d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push edi
push edi
call fcn.004155c0
add esp, 8
test esi, esi
je 0x413924
push esi
call fcn.004f03fe
add esp, 4
mov esi, dword [ebp - 0xaf0]
push esi
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.004f0cd4
mov esp, ebp
pop ebp
ret