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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50ad6a
mov eax, dword fs:[0]
push eax
sub esp, 0x2f0
mov eax, dword [0x567680]
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 esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x2d8], 0
mov eax, dword [0x5671f0]
mov ecx, 0x5671f0
mov dword [ebp - 4], 0
mov dword [ebp - 0x2b8], esi
mov dword [ebp - 0x2fc], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esi], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x2d8], 1
call fcn.00411e00
test al, al
jne 0x4114e4
mov esi, dword [0x568ad4]
mov eax, 0x51eb851f
imul esi
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul ecx, ecx, 0x64
sub esi, ecx
xor ecx, ecx
lea eax, [esi + 0x2f4]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004e8060
push eax
call fcn.004e8ec3
mov esi, dword [ebp - 0x2b8]
add esp, 8
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
je 0x41159b
mov ecx, 0x51707c
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41151b
test dx, dx
je 0x411517
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41151b
add eax, 4
add ecx, 4
test dx, dx
jne 0x4114f5
xor eax, eax
jmp 0x411520
sbb eax, eax
or eax, 1
test eax, eax
sete al
test al, al
jne 0x41159b
lea eax, [ebp - 0x2bc]
push eax
call fcn.00414a00
mov ecx, dword [eax]
xor eax, eax
add esp, 4
test ecx, ecx
setne al
mov dword [ebp - 0x2d8], 3
test eax, eax
jne 0x411559
push 0x80004005
call fcn.00403100
mov eax, dword [edi]
jmp 0x411560
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x411586
test dx, dx
je 0x411582
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x411586
add eax, 4
add ecx, 4
test dx, dx
jne 0x411560
xor eax, eax
jmp 0x41158b
sbb eax, eax
or eax, 1
test eax, eax
sete al
mov byte [ebp - 0x2b1], 0
test al, al
je 0x4115a2
mov byte [ebp - 0x2b1], 1
mov eax, dword [ebp - 0x2d8]
or ebx, 0xffffffff
test al, 2
je 0x4115d7
mov edx, dword [ebp - 0x2bc]
and eax, 0xfffffffd
add edx, 0xfffffff0
mov dword [ebp - 0x2d8], eax
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4115d7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0x2b1], 0
je 0x41168f
lea eax, [ebp - 0x2c0]
push eax
call fcn.00414a00
add esp, 4
mov ecx, dword [eax]
mov esi, dword [esi]
lea edx, [ecx - 0x10]
sub esi, 0x10
mov dword [ebp - 4], 1
cmp edx, esi
je 0x41165f
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x41164c
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x41164c
push edx
call fcn.00405030
add esp, 4
mov dword [ebp - 0x2bc], eax
mov ecx, ebx
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x41163f
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x2bc]
mov esi, dword [ebp - 0x2b8]
add eax, 0x10
mov dword [esi], eax
jmp 0x411665
push dword [ecx - 0xc]
mov esi, dword [ebp - 0x2b8]
push ecx
mov ecx, esi
call fcn.0040b9d0
jmp 0x411665
mov esi, dword [ebp - 0x2b8]
mov edx, dword [ebp - 0x2c0]
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x4117be
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4117be
push 0
push 0
push 3
push 0
push 0
push SysReAllocStringLen
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x2f0], edi
cmp edi, 0xffffffff
jne 0x411755
lea eax, [ebp - 0x2bc]
push eax
call fcn.00414a00
add esp, 4
mov ecx, dword [eax]
mov esi, dword [esi]
lea edx, [ecx - 0x10]
sub esi, 0x10
mov dword [ebp - 4], 2
cmp edx, esi
je 0x411744
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x411728
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x411728
push edx
call fcn.00405030
add esp, 4
mov dword [ebp - 0x2c0], eax
mov ecx, ebx
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x411712
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x2c0]
mov esi, dword [ebp - 0x2b8]
mov edx, dword [ebp - 0x2bc]
add eax, 0x10
mov dword [esi], eax
jmp 0x41166b
push dword [ecx - 0xc]
mov esi, dword [ebp - 0x2b8]
push ecx
mov ecx, esi
call fcn.0040b9d0
mov edx, dword [ebp - 0x2bc]
jmp 0x41166b
mov esi, dword [ebp - 0x2b8]
mov edx, dword [ebp - 0x2bc]
jmp 0x41166b
lea eax, [ebp - 0x2ec]
push eax
xorps xmm0, xmm0
push edi
movq qword [ebp - 0x2ec], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x4117dc
lea eax, [ebp - 0x2c0]
push eax
call fcn.00414a00
add esp, 4
mov dword [ebp - 4], 3
push eax
mov ecx, esi
call fcn.004026d0
mov edx, dword [ebp - 0x2c0]
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x4117b1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x2b8]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
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.004e9514
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x2e8], 0
je 0x4117fd
lea eax, [ebp - 0x2c0]
push eax
call fcn.00414a00
add esp, 4
mov dword [ebp - 4], 4
jmp 0x411788
mov eax, dword [ebp - 0x2ec]
test eax, eax
je 0x4117b1
mov dword [ebp - 0x2d0], 0
mov dword [ebp - 0x2cc], 0
mov dword [ebp - 0x2c8], 0
push eax
lea ecx, [ebp - 0x2d0]
mov dword [ebp - 4], 5
call fcn.00411e90
mov ebx, dword [ebp - 0x2d0]
push 0
lea eax, [ebp - 0x2f8]
push eax
push dword [ebp - 0x2ec]
mov dword [ebp - 0x2f8], 0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x411879
test ebx, ebx
je 0x4117b1
push ebx
call fcn.004e8c3e
add esp, 4
jmp 0x4117b1
lea eax, [ebp - 0x2e4]
push eax
lea eax, [ebp - 0x2c1]
push eax
lea eax, [ebp - 0x2b2]
push eax
push ebx
mov byte [ebp - 0x2b2], 0
mov byte [ebp - 0x2c1], 0
mov dword [ebp - 0x2e4], 0
call fcn.004146e0
mov eax, dword [ebp - 0x2e4]
add esp, 0x10
test eax, eax
jle 0x4118d5
add eax, ebx
push eax
push ebx
lea eax, [ebp - 0x2d4]
push eax
lea ecx, [ebp - 0x2d0]
call fcn.00411d50
mov ebx, dword [ebp - 0x2d0]
cmp byte [ebp - 0x2c1], 0
mov esi, dword [ebp - 0x2cc]
mov dword [ebp - 0x2e0], esi
je 0x411976
mov ecx, ebx
cmp ebx, esi
je 0x411905
mov dl, byte [ecx]
mov bl, byte [ecx + 1]
mov byte [ecx + 1], dl
mov byte [ecx], bl
add ecx, 2
cmp ecx, esi
jne 0x4118f4
mov ebx, dword [0x568ad4]
mov eax, ebx
imul eax, ebx
cdq
mov ecx, 0x15
idiv ecx
cmp edx, 0xa
jne 0x411976
xor ecx, ecx
mov dword [ebp - 0x2bc], ecx
lea edi, [ebp - 0xd0]
jmp 0x411930
xor esi, esi
mov eax, ebx
inc esi
cdq
xor ecx, ecx
idiv esi
mov dword [ebp - 0x2dc], esi
mov dword [ebp - 0x2c0], edx
lea esi, [ecx + 1]
mov ecx, esi
cmp ecx, 0xc
jl 0x411946
mov esi, dword [ebp - 0x2dc]
add edi, 0xc
cmp esi, 2
jl 0x411932
mov ecx, dword [ebp - 0x2bc]
inc ecx
mov dword [ebp - 0x2bc], ecx
cmp ecx, 8
jl 0x411930
mov esi, dword [ebp - 0x2e0]
mov edi, dword [ebp - 0x2d0]
sub esi, edi
cmp byte [edi + esi - 1], 0
je 0x411a74
inc esi
push esi
lea ecx, [ebp - 0x2d0]
call fcn.00411e90
mov edi, dword [ebp - 0x2d0]
mov byte [edi + esi - 1], 0
cmp byte [ebp - 0x2b2], 0
je 0x4119c2
inc esi
push esi
lea ecx, [ebp - 0x2d0]
call fcn.00411e90
mov edi, dword [ebp - 0x2d0]
mov byte [edi + esi - 1], 0
call fcn.00411e00
test al, al
jne 0x411a98
mov ecx, dword [0x568ad4]
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x2e0], eax
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x2dc], eax
mov eax, ecx
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [ebp - 0x2c0], eax
mov eax, 0x66666667
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x2f4], eax
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
xor ebx, ebx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x2bc], ebx
mov dword [ebp - 0x2d4], eax
lea esi, [ebp - 0x2af]
nop
mov eax, dword [0x568ad4]
mov cl, al
sub cl, bl
mov edi, 1
mov ebx, 0x10
add esi, 6
inc edi
dec ebx
jne 0x411a53
mov ebx, dword [ebp - 0x2bc]
inc ebx
mov dword [ebp - 0x2bc], ebx
cmp ebx, 5
jl 0x411a40
mov edi, dword [ebp - 0x2d0]
jmp 0x411a98
cmp byte [ebp - 0x2b2], 0
je 0x411ae5
lea eax, [esi + 2]
push eax
lea ecx, [ebp - 0x2d0]
call fcn.00411e90
mov edi, dword [ebp - 0x2d0]
mov word [edi + esi], 0
cmp byte [ebp - 0x2b2], 0
je 0x411ae5
push edi
lea ecx, [ebp - 0x2d4]
call fcn.00401c30
mov esi, dword [ebp - 0x2b8]
push eax
mov ecx, esi
mov byte [ebp - 4], 6
call fcn.004026d0
mov edx, dword [ebp - 0x2d4]
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 0x411b51
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x411b51
mov eax, dword [0x5671f0]
mov ecx, 0x5671f0
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x2bc], eax
push edi
lea ecx, [ebp - 0x2bc]
mov byte [ebp - 4], 7
call fcn.004027d0
mov esi, dword [ebp - 0x2b8]
lea eax, [ebp - 0x2bc]
push eax
mov ecx, esi
mov byte [ebp - 4], 8
call fcn.004026d0
mov edx, dword [ebp - 0x2bc]
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 0x411b47
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push esi
push esi
call fcn.00413230
add esp, 8
test edi, edi
je 0x411b5e
push edi
call fcn.004e8c3e
add esp, 4
mov edi, dword [ebp - 0x2f0]
jmp 0x4117b7