Function at 0x406ea0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4262db
mov eax, dword fs:[0]
push eax
mov eax, 0x35b0
call fcn.0041f1a0
mov eax, dword [0x4310b0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, ecx
xor esi, esi
cmp dword [ebx + 0x14], 0x10
mov dword [ebx + 0x10], esi
jb 0x406ee4
mov ecx, dword [ebx]
mov byte [ecx], 0
cmp eax, esi
jne 0x406ef2
xor al, al
jmp 0x40715c
push esi
push 0x8000000
push 3
push esi
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x3574], edi
mov dword [ebp - 4], esi
cmp edi, 0xffffffff
je 0x406eeb
push 0x38
lea eax, [ebp - 0x35bc]
push esi
push eax
call fcn.0040fb20
add esp, 0xc
lea eax, [ebp - 0x35bc]
call fcn.00408510
mov dword [ebp - 0x3580], esi
mov dword [ebp - 0x3578], esi
lea ecx, [ebp - 0x256c]
mov esi, 0x1000
mov byte [ebp - 0x357c], 0
mov byte [ebp - 0x356d], 0
mov byte [ebp - 0x356e], 0
mov dword [ebp - 0x35b0], ecx
mov dword [ebp - 0x35ac], esi
jmp 0x406f76
mov edi, dword [ebp - 0x3574]
cmp byte [ebp - 0x356d], 0
jne 0x407138
push 0
lea edx, [ebp - 0x3584]
push edx
push esi
lea eax, [ebp - 0x356c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
sete al
mov byte [ebp - 0x356d], al
test al, al
jne 0x407047
mov eax, dword [ebp - 0x3584]
cmp eax, esi
jae 0x406fbf
mov byte [ebp - 0x356e], 1
lea ecx, [ebp - 0x356c]
push 0
lea edi, [ebp - 0x35bc]
mov dword [ebp - 0x35bc], ecx
mov dword [ebp - 0x35b8], eax
call fcn.00408770
add esp, 4
cmp dword [ebp - 0x35ac], 0
jne 0x407047
lea ebx, [ebx]
lea edx, [ebp - 0x156c]
push edx
lea edi, [ebp - 0x3580]
mov eax, esi
lea ecx, [ebp - 0x256c]
call fcn.00407e50
add esp, 4
push eax
lea eax, [ebp - 0x156c]
push eax
mov ecx, ebx
call fcn.00407290
lea ecx, [ebp - 0x256c]
push 0
lea edi, [ebp - 0x35bc]
mov dword [ebp - 0x35b0], ecx
mov dword [ebp - 0x35ac], esi
call fcn.00408770
add esp, 4
cmp dword [ebp - 0x35ac], 0
je 0x406ff0
cmp byte [ebp - 0x356e], 0
je 0x406f70
cmp byte [ebp - 0x356d], 0
jne 0x407138
push 4
lea edi, [ebp - 0x35bc]
call fcn.00408770
add esp, 4
test eax, eax
jne 0x4070d0
cmp dword [ebp - 0x35ac], 0
jne 0x4070d0
lea edx, [ebp - 0x156c]
push edx
lea edi, [ebp - 0x3580]
mov eax, esi
lea ecx, [ebp - 0x256c]
call fcn.00407e50
add esp, 4
push eax
lea eax, [ebp - 0x156c]
push eax
mov ecx, ebx
call fcn.00407290
lea ecx, [ebp - 0x256c]
push 4
lea edi, [ebp - 0x35bc]
mov dword [ebp - 0x35b0], ecx
mov dword [ebp - 0x35ac], esi
call fcn.00408770
add esp, 4
test eax, eax
je 0x407075
cmp eax, 1
je 0x4070f0
cmp dword [ebx + 0x14], 0x10
mov byte [ebp - 0x356d], 1
mov dword [ebx + 0x10], 0
jb 0x4070eb
mov ebx, dword [ebx]
mov byte [ebx], 0
jmp 0x407138
lea edx, [ebp - 0x156c]
mov eax, esi
sub eax, dword [ebp - 0x35ac]
push edx
lea edi, [ebp - 0x3580]
lea ecx, [ebp - 0x256c]
call fcn.00407e50
add esp, 4
push eax
lea eax, [ebp - 0x156c]
push eax
mov ecx, ebx
call fcn.00407290
mov esi, edi
lea ecx, [ebp - 0x156c]
call fcn.00407f70
push eax
push ecx
mov ecx, ebx
call fcn.00407290
lea esi, [ebp - 0x35bc]
call fcn.00408f50
cmp byte [ebp - 0x356d], 0
mov edx, dword [ebp - 0x3574]
push edx
sete bl
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040e862
mov esp, ebp
pop ebp
ret