Function at 0x406610
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x414fe0
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x41b050]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov eax, dword [esp + 0x80]
xor esi, esi
cmp eax, esi
je 0x406850
push esi
push 0x80
push 3
push esi
push esi
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x406850
push esi
push esi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x78], esi
mov ecx, dword [esp + 0x80]
lea eax, [esp + 0x1c]
lea edi, [esp + 0x24]
lea ebx, [esp + 0x14]
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], esi
call fcn.00406120
xor ebx, ebx
cmp al, bl
je 0x406722
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov ecx, esi
add ecx, 0xffffffff
mov eax, edi
adc eax, 0xffffffff
cmp eax, ebx
ja 0x406722
jb 0x4066c9
cmp ecx, 0xffffe
ja 0x406722
mov eax, esi
lea ecx, [esp + 0x30]
call fcn.004033d0
mov eax, dword [esp + 0x34]
cmp eax, ebx
mov dword [esp + 0x80], ebx
je 0x4066eb
mov ecx, dword [esp + 0x38]
sub ecx, eax
jne 0x4066f4
call fcn.0040a917
mov eax, dword [esp + 0x34]
push ebx
lea edx, [esp + 0x84]
push edx
push esi
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x80]
xor ecx, ecx
cmp ecx, edi
ja 0x406722
jb 0x406719
cmp eax, esi
jae 0x406722
lea ecx, [esp + 0x30]
call fcn.004033d0
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x34]
cmp eax, ebx
je 0x406739
mov ecx, dword [esp + 0x38]
sub ecx, eax
jne 0x406763
mov dword [esp + 0x78], 0xffffffff
mov eax, dword [esp + 0x34]
cmp eax, ebx
je 0x406752
push eax
call fcn.0040a31e
add esp, 4
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
jmp 0x406850
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x78], 1
lea eax, [esp + 0x50]
call fcn.004081e0
mov edx, dword [esp + 0x34]
cmp edx, ebx
jne 0x406789
xor esi, esi
jmp 0x406795
mov eax, dword [esp + 0x38]
sub eax, edx
cmp eax, ebx
mov esi, eax
ja 0x40679e
call fcn.0040a917
mov edx, dword [esp + 0x34]
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x54]
push ecx
mov ecx, esi
call fcn.004084e0
test al, al
je 0x406832
mov edi, dword [esp + 0x44]
cmp edi, ebx
mov ecx, dword [esp + 0x48]
jne 0x4067c3
xor esi, esi
jmp 0x4067c7
mov esi, ecx
sub esi, edi
mov eax, 0x35ae0b31
mul esi
mov eax, esi
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 0xa
imul eax, eax, 0x69d
sub esi, eax
jne 0x406832
cmp edi, ebx
jne 0x4067eb
xor ecx, ecx
jmp 0x4067ed
sub ecx, edi
mov eax, 0x35ae0b31
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 0xa
mov esi, ecx
je 0x406832
mov ebp, dword [esp + 0x84]
push esi
push ebp
call fcn.00407690
imul esi, esi, 0x69d
push esi
xor edi, edi
lea esi, [esp + 0x44]
call fcn.00403480
push eax
mov esi, ebp
call fcn.00407760
push eax
call fcn.0040c4d0
add esp, 0xc
mov byte [esp + 0x78], bl
lea esi, [esp + 0x40]
call fcn.004033a0
mov dword [esp + 0x78], 0xffffffff
lea esi, [esp + 0x30]
call fcn.004033a0
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret 8