Function at 0x4017e0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4a1498
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x4d16b0]
xor eax, esp
mov dword [esp + 0x24], eax
push ebp
push esi
push edi
mov eax, dword [0x4d16b0]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov esi, ecx
xor ebp, ebp
xor eax, eax
cmp esi, ebp
je 0x401a3f
cmp dword [ebx + 8], ebp
je 0x401a3f
cmp dword [ebx + 0x20], ebp
jne 0x401834
mov ecx, ebx
call fcn.00402020
xor edi, edi
mov dword [esp + 0x10], edi
push ebp
push 0x80
push 3
push ebp
push 1
push connect
push esi
mov dword [esp + 0x5c], ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x4018b5
call fcn.00405370
cmp eax, ebp
jl 0x401a1b
lea esi, [esp + 0x1c]
lea ecx, [esp + 0x10]
call fcn.00405450
test eax, eax
jl 0x401a0a
mov eax, dword [ebx + 0x20]
push ebp
lea ecx, [esp + 0x18]
push ecx
push 0xac
push eax
push edi
mov dword [esp + 0x28], ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4018bd
call fcn.00405370
mov esi, eax
cmp esi, ebp
jl 0x401a0a
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], eax
jmp 0x4018e2
mov dword [esp + 0x10], eax
mov edi, eax
jmp 0x401867
cmp dword [esp + 0x14], 0xac
jne 0x401a0a
xor esi, esi
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], eax
jmp 0x4018e2
xor eax, eax
cmp esi, eax
jl 0x401a08
push eax
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x20], eax
push 0x10
lea eax, [esp + 0x30]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40198f
call fcn.00405370
mov esi, eax
test esi, esi
jl 0x401a08
mov ecx, dword [esp + 0x30]
add ecx, 0x10
push ecx
call fcn.0047e5bc
mov edx, dword [esp + 0x28]
mov edi, eax
mov dword [edi], edx
mov eax, dword [esp + 0x2c]
mov dword [edi + 4], eax
mov ecx, dword [esp + 0x30]
mov dword [edi + 8], ecx
mov edx, dword [esp + 0x34]
mov dword [edi + 0xc], edx
mov ecx, dword [esp + 0x34]
mov eax, dword [ebx + 0x20]
add ecx, 0x10
add esp, 4
cmp ecx, dword [eax + 0xc]
ja 0x40199d
mov esi, edx
lea ecx, [edi + 0x10]
lea edx, [esp + 0x10]
call fcn.00405390
mov esi, eax
test esi, esi
jl 0x4019e7
mov eax, dword [ebx + 0x20]
mov edx, dword [eax + 0xc]
mov ecx, dword [edi + 0xc]
imul edx, ebp
add ecx, 0x10
push ecx
lea eax, [edx + eax + 0xac]
push edi
push eax
call fcn.00488b70
add esp, 0xc
add ebp, 1
jmp 0x4019e7
cmp dword [esp + 0x18], 0x10
jne 0x401a08
xor esi, esi
jmp 0x401919
cmp ecx, dword [eax + 0x14]
ja 0x4019e7
mov esi, edx
lea ecx, [edi + 0x10]
lea edx, [esp + 0x10]
call fcn.00405390
mov esi, eax
test esi, esi
jl 0x4019e7
mov eax, dword [ebx + 0x20]
mov ecx, dword [edi + 0xc]
mov edx, dword [eax + 0xc]
imul edx, dword [eax + 8]
add ecx, 0x10
push ecx
mov ecx, dword [eax + 0x14]
imul ecx, dword [esp + 0x18]
add edx, eax
lea edx, [ecx + edx + 0xac]
push edi
push edx
call fcn.00488b70
add esp, 0xc
add dword [esp + 0x14], 1
push edi
call fcn.0047f807
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
add eax, 1
add esp, 4
cmp eax, 0x15
mov dword [esp + 0x1c], eax
jl 0x4018e0
xor ebp, ebp
cmp edi, ebp
je 0x401a1b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x10], ebp
mov edi, ebp
mov eax, dword [ebx + 0x20]
cmp dword [eax], 0x43424d4d
je 0x401a2d
mov ecx, ebx
call fcn.00402020
cmp edi, ebp
mov esi, 1
je 0x401a3d
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.0047f460
add esp, 0x34
ret