Function at 0x1000c629
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get file size
Initialize winsock library
Read and send data from client to server
Read file on windows
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
lea ebp, [esp - 0x1c8]
sub esp, 0x248
mov eax, dword [0x100310fc]
xor eax, ebp
mov dword [ebp + 0x1c4], eax
mov eax, dword [ebp + 0x1d0]
push ebx
push edi
mov ebx, ecx
push 0x10029660
mov dword [ebp + 0x10], eax
mov dword [ebp], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor edi, edi
cmp eax, edi
je 0x1000c676
push str.CancelIo
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 4], eax
jmp 0x1000c679
mov dword [ebp - 4], edi
mov eax, dword [ebx + 8]
push edi
push 0x80
push 3
push edi
push 1
push closesocket
push 0x10033858
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x1000ca57
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, 0x19000
mov dword [ebp - 0x10], eax
mov esi, eax
cmp eax, ecx
jb 0x1000c6bf
mov esi, ecx
mov edx, 0xc6d
cmp esi, edx
jae 0x1000c6cd
mov dword [ebp + 8], edx
jmp 0x1000c6d7
mov dword [ebp + 8], eax
cmp eax, ecx
jb 0x1000c6d7
mov dword [ebp + 8], ecx
push dword [ebp + 8]
call fcn.10001029
mov esi, eax
pop ecx
cmp esi, edi
je 0x1000ca44
lea eax, [ebp + 0x24]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp + 0x20], eax
cmp eax, edi
jne 0x1000ca3b
push 0x10
lea eax, [ebp + 0x1b4]
push edi
push eax
call fcn.100162f0
mov ecx, dword [ebp + 0x10]
mov al, byte [ecx]
add esp, 0xc
cmp al, 0x30
jl 0x1000c72f
cmp al, 0x39
jg 0x1000c72f
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp + 0x1b8], eax
jmp 0x1000c75c
push ecx
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, edi
je 0x1000c755
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [ebp + 0x1b8]
push eax
call fcn.100169c0
add esp, 0xc
jmp 0x1000c75c
or dword [ebp + 0x1b8], 0xffffffff
cmp dword [ebp + 0x1b8], 0xffffffff
je 0x1000ca35
push 2
pop eax
mov word [ebp + 0x1b4], ax
movzx eax, word [0x10032e04]
push eax
call dword [sym.imp.WS2_32.dll_htons]
push 1
push edi
push edi
push 6
push 1
push 2
mov word [ebp + 0x1b6], ax
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov dword [ebp + 0x18], eax
cmp eax, 0xffffffff
je 0x1000ca35
push 1
push 0x100
lea ecx, [ebp - 0x54]
call fcn.1000129a
lea eax, [ebp - 0x54]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x14], eax
mov eax, dword [ebx + 4]
mov ebx, dword [sym.imp.WS2_32.dll_WSAEventSelect]
push 0x10
push eax
push dword [ebp + 0x18]
mov dword [ebp + 0x10], edi
mov dword [ebp + 0x14], eax
call ebx
cmp eax, 0xffffffff
jne 0x1000c7e9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp + 0x20], eax
jmp 0x1000c9d9
cmp dword [ebp + 0xc], edi
je 0x1000c7fe
push edi
push edi
push 0x8001
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_PostMessageA]
push 0x10
lea eax, [ebp + 0x1b4]
push eax
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1000c84b
mov eax, dword [ebp]
call fcn.1000c082
mov dword [ebp + 0x20], eax
cmp eax, edi
jne 0x1000c9fb
lea eax, [ebp - 0x80]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
cmp eax, 0xffffffff
je 0x1000c7db
mov eax, dword [ebp - 0x6c]
mov dword [ebp + 0x20], eax
cmp eax, edi
jne 0x1000c9fb
mov dword [ebp + 0x10], 1
cmp dword [ebp + 0xc], edi
je 0x1000c867
push edi
push edi
push 0x8002
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_PostMessageA]
push edi
push dword [ebp + 0x14]
push dword [ebp + 0x18]
call ebx
cmp eax, 0xffffffff
je 0x1000c7db
mov ebx, dword [ebp + 8]
mov dword [ebp + 0x1c], edi
mov dword [esi], 0x31305442
add dword [ebp + 0x1c], 4
mov eax, dword [ebp + 0x1c]
mov dword [eax + esi], edi
add dword [ebp + 0x1c], 4
mov eax, dword [ebp + 0x1c]
mov byte [eax + esi], 1
inc dword [ebp + 0x1c]
mov eax, dword [ebp + 0x1c]
mov dword [eax + esi], edi
add dword [ebp + 0x1c], 4
push ebx
lea eax, [ebp + 0x1c]
push eax
push esi
lea eax, [ebp - 0x18]
push 0x10032e08
push eax
call fcn.1000e566
add esp, 0x14
test al, al
jne 0x1000c8ce
mov dword [ebp + 0x20], 0x54f
jmp 0x1000c9f0
push ebx
lea eax, [ebp + 0x1c]
push eax
push esi
lea eax, [ebp - 0x18]
push 0x10032f10
push eax
call fcn.1000e566
add esp, 0x14
test al, al
je 0x1000c8c2
call fcn.10006941
push ebx
lea ecx, [ebp + 0x1c]
push ecx
push esi
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.1000e566
add esp, 0x14
test al, al
je 0x1000c8c2
push ebx
lea eax, [ebp + 0x1c]
push eax
push esi
lea eax, [ebp - 0x18]
push 0x10033330
push eax
call fcn.1000e566
add esp, 0x14
test al, al
je 0x1000c8c2
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp - 0x10]
add eax, ecx
push 0x14
mov dword [esi + 4], eax
lea eax, [ebp - 0x2c]
push edi
push eax
call fcn.100162f0
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x1c]
add esp, 0xc
mov dword [ebp - 8], eax
mov dword [ebp + 8], esi
mov dword [ebp + 4], eax
cmp eax, edi
jbe 0x1000c9a9
push edi
lea eax, [ebp - 0x2c]
push eax
push edi
lea eax, [ebp + 0x14]
push eax
push 1
lea eax, [ebp + 4]
push eax
push dword [ebp + 0x18]
mov dword [ebp + 0x14], edi
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x1000c99e
mov eax, dword [ebp]
call fcn.1000c082
mov dword [ebp + 0x20], eax
cmp eax, edi
jne 0x1000c9f0
lea eax, [ebp - 0x10]
push eax
push edi
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_WSAGetOverlappedResult]
test eax, eax
je 0x1000c7db
mov eax, dword [ebp + 0x14]
add dword [ebp + 8], eax
sub dword [ebp + 4], eax
jne 0x1000c950
push edi
lea eax, [ebp - 8]
push eax
push ebx
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1000c9c4
mov eax, dword [ebp - 8]
cmp eax, edi
jne 0x1000c946
cmp dword [ebp + 0xc], edi
je 0x1000c9d9
push edi
push edi
push 0x8003
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_PostMessageA]
cmp dword [ebp + 0x20], edi
jne 0x1000c9eb
push 2
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_shutdown]
jmp 0x1000ca21
cmp dword [ebp + 0x10], edi
je 0x1000c9fb
cmp dword [ebp - 4], edi
je 0x1000c9fb
push dword [ebp + 0x18]
call dword [ebp - 4]
xor eax, eax
inc eax
mov word [ebp + 0x10], ax
xor eax, eax
push 4
mov word [ebp + 0x12], ax
lea eax, [ebp + 0x10]
push eax
push 0x80
push 0xffff
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_setsockopt]
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [ebp - 0x30]
call fcn.1000121a
mov ebx, dword [ebp]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push esi
call fcn.10016394
pop ecx
jmp 0x1000ca4b
mov dword [ebp + 0x20], 8
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
jmp 0x1000ca60
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x20], eax
cmp dword [ebp + 0x20], edi
je 0x1000ca6f
push dword [ebp + 0x20]
mov ecx, ebx
call fcn.1000c034
mov ecx, dword [ebp + 0x1c4]
mov eax, dword [ebp + 0x20]
pop edi
xor ecx, ebp
pop ebx
call fcn.100162d3
add ebp, 0x1c8
leave
ret