Function at 0x406958
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x483c84
mov eax, dword fs:[0]
push eax
sub esp, 0x110
mov eax, dword [0x4b2068]
xor eax, esp
mov dword [esp + 0x108], eax
push ebx
push esi
push edi
mov eax, dword [0x4b2068]
xor eax, esp
push eax
lea eax, [esp + 0x120]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x20], ecx
mov ecx, dword [ebp + 0xc]
xor edi, edi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x14], edi
push 3
push 7
push connect
push eax
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x13c], edi
call fcn.004058cd
test eax, eax
jge 0x4069e2
cmp dword [esp + 0x14], edi
je 0x4069db
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x406c94
mov esi, 0x1000
push esi
call fcn.0047e92c
mov ebx, eax
lea eax, [esp + 0xb0]
push eax
mov dword [esp + 0x24], edi
call fcn.00417209
add esp, 8
push edi
lea eax, [esp + 0x20]
push eax
push esi
push ebx
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, edi
jne 0x406a20
call fcn.0040f8e0
jmp 0x406a22
xor eax, eax
cmp eax, edi
jl 0x406a63
cmp dword [esp + 0x1c], edi
je 0x406a6f
mov eax, dword [0x4b5138]
cmp eax, edi
je 0x406a3c
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [esp + 0x1c]
lea eax, [esp + 0xb0]
push ebx
push eax
call fcn.00417231
mov eax, dword [0x4b5138]
add esp, 0xc
cmp eax, edi
je 0x406a03
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x406a03
push ebx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
pop ecx
jmp 0x4069cb
mov eax, dword [0x4b457c]
mov ecx, 0x4b457c
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x18], eax
lea eax, [esp + 0x108]
push eax
lea eax, [esp + 0xb0]
push eax
mov byte [esp + 0x130], 1
call fcn.004172cc
mov eax, dword [0x4b5138]
cmp eax, edi
pop ecx
pop ecx
je 0x406ab2
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
movzx eax, byte [esp + 0x117]
push eax
movzx eax, byte [esp + 0x11a]
push eax
movzx eax, byte [esp + 0x11d]
push eax
movzx eax, byte [esp + 0x120]
push eax
movzx eax, byte [esp + 0x123]
push eax
movzx eax, byte [esp + 0x126]
push eax
movzx eax, byte [esp + 0x129]
push eax
movzx eax, byte [esp + 0x12c]
push eax
movzx eax, byte [esp + 0x12f]
push eax
movzx eax, byte [esp + 0x132]
push eax
movzx eax, byte [esp + 0x135]
push eax
movzx eax, byte [esp + 0x138]
push eax
movzx eax, byte [esp + 0x13b]
push eax
movzx eax, byte [esp + 0x13e]
push eax
movzx eax, byte [esp + 0x141]
push eax
movzx eax, byte [esp + 0x144]
push eax
mov edi, str._02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x
lea eax, [esp + 0x58]
push edi
push eax
call fcn.00404e7f
add esp, 0x48
push dword [esp + 0x20]
lea eax, [esp + 0x1c]
push eax
call fcn.004021d8
lea eax, [esp + 0x18]
call fcn.0040232d
lea eax, [esp + 0xac]
push eax
call fcn.00417209
mov ebx, dword [esp + 0x1c]
add esp, 4
push ebx
lea esi, [esp + 0x2c]
call fcn.0040c44f
push dword [ebx - 0xc]
push dword [eax]
lea eax, [esp + 0xb4]
push eax
call fcn.00417231
lea eax, [esp + 0x38]
add esp, 0xc
cmp dword [esp + 0x28], eax
je 0x406bb4
push dword [esp + 0x28]
call dword [sym.imp.MSVCR80.dll_free]
pop ecx
lea eax, [esp + 0x108]
push eax
lea eax, [esp + 0xb0]
push eax
call fcn.004172cc
mov eax, dword [0x4b5138]
test eax, eax
pop ecx
pop ecx
je 0x406bdb
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
movzx eax, byte [esp + 0x117]
push eax
movzx eax, byte [esp + 0x11a]
push eax
movzx eax, byte [esp + 0x11d]
push eax
movzx eax, byte [esp + 0x120]
push eax
movzx eax, byte [esp + 0x123]
push eax
movzx eax, byte [esp + 0x126]
push eax
movzx eax, byte [esp + 0x129]
push eax
movzx eax, byte [esp + 0x12c]
push eax
movzx eax, byte [esp + 0x12f]
push eax
movzx eax, byte [esp + 0x132]
push eax
movzx eax, byte [esp + 0x135]
push eax
movzx eax, byte [esp + 0x138]
push eax
movzx eax, byte [esp + 0x13b]
push eax
movzx eax, byte [esp + 0x13e]
push eax
movzx eax, byte [esp + 0x141]
push eax
movzx eax, byte [esp + 0x144]
push eax
push edi
push dword [esp + 0x68]
call fcn.00404e7f
add esp, 0x48
lea eax, [ebx - 0x10]
call fcn.0040214e
cmp dword [esp + 0x14], 0
je 0x406c91
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
mov ecx, dword [esp + 0x120]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x108]
xor ecx, esp
call fcn.0047f7b2
mov esp, ebp
pop ebp
ret