Function at 0x413ef0
Capabilities:
Check if file exists
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56f4c6
mov eax, dword fs:[0]
push eax
mov eax, 0x4030
call fcn.0054f040
mov eax, dword [0x5d2fec]
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 ebx, ecx
mov eax, dword [0x5dd728]
cmp eax, dword [0x5dd72c]
sete al
test al, al
je 0x414478
call fcn.00417ce3
mov ecx, eax
test ecx, ecx
jne 0x413f4f
push 0x80004005
call fcn.00407010
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x4024], esi
mov dword [ebp - 4], 0
call fcn.00417ce3
mov ecx, eax
test ecx, ecx
jne 0x413f79
push 0x80004005
call fcn.00407010
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x4020], eax
mov byte [ebp - 4], 1
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x105
or eax, ecx
jge 0x413fb5
push 0x105
lea ecx, [ebp - 0x4024]
call fcn.00406e60
mov esi, dword [ebp - 0x4024]
cmp dword [esi - 8], 0x105
jge 0x413fc8
push 0x80070057
call fcn.00407010
push 0x105
xor eax, eax
mov dword [esi - 0xc], 0x105
push esi
push eax
mov word [esi + 0x20a], ax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x5c
push esi
call fcn.005512e5
add esp, 8
test eax, eax
jne 0x413ff9
or eax, 0xffffffff
jmp 0x413ffd
sub eax, esi
sar eax, 1
push eax
lea eax, [ebp - 0x4038]
push eax
lea ecx, [ebp - 0x4024]
call fcn.00405b70
push eax
lea ecx, [ebp - 0x4020]
mov byte [ebp - 4], 2
call fcn.00406cf0
mov byte [ebp - 4], 1
or edi, 0xffffffff
mov edx, dword [ebp - 0x4038]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x414044
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x4020]
mov ecx, 0x5dd64c
push eax
call fcn.00406cf0
push 0x5b2378
lea eax, [ebp - 0x4020]
mov dword [ebp - 0x401c], 0
push eax
lea eax, [ebp - 0x401c]
push eax
call fcn.00406a20
add esp, 0xc
push str.Wow64DisableWow64FsRedirection
push str.kernel32
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4140a2
lea ecx, [ebp - 0x402c]
push ecx
call eax
push dword [ebp - 0x401c]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4140ca
push 0x10
push 0x5b2330
push 0x5b2398
mov ecx, ebx
call fcn.004239c3
jmp 0x4143f6
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push dword [ebp - 0x401c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0
mov ebx, eax
mov dword [ebp - 0x4038], 0
push 2
push ebx
mov dword [ebp - 0x402c], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x4000
lea eax, [ebp - 0x4010]
push 0
push eax
call fcn.00551910
add esp, 0xc
call fcn.00417ce3
mov ecx, eax
test ecx, ecx
jne 0x414132
push 0x80004005
call fcn.00407010
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x4018], eax
push 0
lea eax, [ebp - 0x4028]
mov byte [ebp - 4], 4
push eax
push 0x4000
lea eax, [ebp - 0x4010]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x4010]
push eax
lea eax, [ebp - 0x4018]
push 0x5af300
push eax
call fcn.00406ff0
add esp, 0xc
mov dword [ebp - 0x4014], 0
call fcn.00417ce3
mov ecx, eax
test ecx, ecx
jne 0x41419a
push 0x80004005
call fcn.00407010
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x4014], eax
lea eax, [ebp - 0x4038]
mov byte [ebp - 4], 5
push eax
push 0x5afd40
lea eax, [ebp - 0x4034]
push eax
lea ecx, [ebp - 0x4018]
call fcn.00417550
push eax
lea ecx, [ebp - 0x4014]
mov byte [ebp - 4], 6
call fcn.00406cf0
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x4034]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4141fb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x4014]
call fcn.00416ec0
mov ecx, eax
call fcn.00416e10
mov ecx, 0x5af8f0
mov eax, dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41423a
test dx, dx
je 0x414236
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41423a
add eax, 4
add ecx, 4
test dx, dx
jne 0x414214
xor eax, eax
jmp 0x41423f
sbb eax, eax
or eax, 1
test eax, eax
setne al
test al, al
je 0x4143a8
mov eax, dword [ebp - 0x4014]
cmp dword [eax - 0xc], 1
jle 0x414300
mov eax, dword [0x5dd72c]
lea ecx, [ebp - 0x4014]
cmp ecx, eax
jae 0x4142b5
mov edx, ecx
mov ecx, dword [0x5dd728]
cmp ecx, edx
ja 0x4142b5
mov edi, edx
sub edi, ecx
sar edi, 2
cmp eax, dword [0x5dd730]
jne 0x41429c
push ecx
mov ecx, 0x5dd728
call fcn.00416ba0
mov eax, dword [0x5dd72c]
mov ecx, dword [0x5dd728]
mov dword [ebp - 0x4034], eax
lea ecx, [ecx + edi*4]
mov dword [ebp - 0x4030], eax
mov byte [ebp - 4], 7
test eax, eax
je 0x4142f4
jmp 0x4142e7
cmp eax, dword [0x5dd730]
jne 0x4142cd
push ecx
mov ecx, 0x5dd728
call fcn.00416ba0
mov eax, dword [0x5dd72c]
mov dword [ebp - 0x4030], eax
mov dword [ebp - 0x4034], eax
mov byte [ebp - 4], 8
test eax, eax
je 0x4142f4
lea ecx, [ebp - 0x4014]
push ecx
mov ecx, eax
call fcn.004069a0
mov eax, dword [0x5dd72c]
add eax, 4
mov byte [ebp - 4], 5
mov dword [0x5dd72c], eax
lea eax, [ebp - 0x4038]
push eax
push 0x5afd40
lea eax, [ebp - 0x403c]
push eax
lea ecx, [ebp - 0x4018]
call fcn.00417550
mov byte [ebp - 4], 9
mov ecx, dword [eax]
mov edi, dword [ebp - 0x4014]
add edi, 0xfffffff0
lea edx, [ecx - 0x10]
cmp edx, edi
je 0x414396
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x414387
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x414387
push edx
call fcn.00406c80
add esp, 4
mov dword [ebp - 0x4034], eax
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x41436c
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x4034]
add eax, 0x10
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x403c]
or edi, 0xffffffff
mov dword [ebp - 0x4014], eax
jmp 0x4141e4
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x4014]
call fcn.00406bd0
mov byte [ebp - 4], 5
or edi, 0xffffffff
mov edx, dword [ebp - 0x403c]
jmp 0x4141e4
push dword [ebp - 0x402c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 4
mov eax, edi
mov edx, dword [ebp - 0x4014]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4143d5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
mov eax, edi
mov edx, dword [ebp - 0x4018]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4143f6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.Wow64RevertWow64FsRedirection
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x41441a
lea ecx, [ebp - 0x4030]
push ecx
call eax
mov byte [ebp - 4], 1
mov eax, edi
mov edx, dword [ebp - 0x401c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41443b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, edi
mov edx, dword [ebp - 0x4020]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41445c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x414478
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
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.0054e73a
mov esp, ebp
pop ebp
ret