Function at 0x1001045d
Capabilities:
Create tcp socket
Get file size
Initialize winsock library
Resolve dns

Disassembly:
push ebp
lea ebp, [esp - 0x1c4]
sub esp, 0x244
mov eax, dword [0x1002d4a0]
push ebx
push esi
push str.KERNEL32.DLL
mov dword [ebp + 0x1c0], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor esi, esi
cmp eax, esi
je 0x1001049a
push str.CancelIo
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 4], eax
jmp 0x1001049d
mov dword [ebp - 4], esi
mov ebx, dword [ebp + 0x1d0]
mov eax, dword [ebx + 8]
push esi
push 0x80
push 3
push esi
push 1
push closesocket
push 0x1002f718
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x1001088b
push edi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, 0x19000
cmp eax, ecx
mov dword [ebp - 0x18], eax
mov edi, eax
jb 0x100104e9
mov edi, ecx
mov edx, 0xc6e
cmp edi, edx
jae 0x100104f7
mov dword [ebp + 4], edx
jmp 0x10010501
cmp eax, ecx
mov dword [ebp + 4], eax
jb 0x10010501
mov dword [ebp + 4], ecx
push dword [ebp + 4]
call fcn.1001b998
mov edi, eax
cmp edi, esi
pop ecx
je 0x10010878
lea eax, [ebp + 0x20]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
cmp eax, esi
mov dword [ebp + 0x1c], eax
jne 0x1001086f
push 0x10
lea eax, [ebp + 0x1b0]
push esi
push eax
call fcn.1001b590
mov ecx, dword [ebp + 0x1cc]
mov al, byte [ecx]
add esp, 0xc
cmp al, 0x30
jl 0x1001055c
cmp al, 0x39
jg 0x1001055c
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp + 0x1b4], eax
jmp 0x10010589
push ecx
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, esi
je 0x10010582
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [ebp + 0x1b4]
push eax
call fcn.1001ba30
add esp, 0xc
jmp 0x10010589
or dword [ebp + 0x1b4], 0xffffffff
cmp dword [ebp + 0x1b4], 0xffffffff
je 0x10010869
xor eax, eax
mov ax, word [0x1002f504]
mov word [ebp + 0x1b0], 2
push eax
call dword [sym.imp.WS2_32.dll_htons]
push 1
push esi
push esi
push 6
push 1
push 2
mov word [ebp + 0x1b2], ax
call dword [sym.imp.WS2_32.dll_WSASocketA]
cmp eax, 0xffffffff
mov dword [ebp + 0x14], eax
je 0x10010869
push 1
push 0x100
lea ecx, [ebp - 0x54]
call fcn.1000acff
lea eax, [ebp - 0x54]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 8], eax
mov eax, dword [ebx + 4]
mov ebx, dword [sym.imp.WS2_32.dll_WSAEventSelect]
push 0x10
push eax
push dword [ebp + 0x14]
mov dword [ebp + 8], esi
mov dword [ebp + 0x10], eax
call ebx
cmp eax, 0xffffffff
je 0x10010814
cmp dword [ebp + 0xc], esi
je 0x10010621
push esi
push esi
push 0x8001
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_PostMessageA]
push 0x10
lea eax, [ebp + 0x1b0]
push eax
push dword [ebp + 0x14]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x10010675
mov eax, dword [ebp + 0x1d0]
call fcn.1000fc9c
cmp eax, esi
mov dword [ebp + 0x1c], eax
jne 0x1001082f
lea eax, [ebp - 0x80]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0x14]
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
cmp eax, 0xffffffff
je 0x10010814
mov eax, dword [ebp - 0x6c]
cmp eax, esi
mov dword [ebp + 0x1c], eax
jne 0x1001082f
cmp dword [ebp + 0xc], esi
mov dword [ebp + 8], 1
je 0x10010691
push esi
push esi
push 0x8002
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_PostMessageA]
push esi
push dword [ebp + 0x10]
push dword [ebp + 0x14]
call ebx
cmp eax, 0xffffffff
je 0x10010814
mov ebx, dword [ebp + 4]
mov dword [ebp + 0x18], esi
mov dword [edi], 0x31305442
add dword [ebp + 0x18], 4
mov eax, dword [ebp + 0x18]
mov dword [eax + edi], esi
add dword [ebp + 0x18], 4
mov eax, dword [ebp + 0x18]
mov byte [eax + edi], 1
inc dword [ebp + 0x18]
mov eax, dword [ebp + 0x18]
mov dword [eax + edi], esi
add dword [ebp + 0x18], 4
push ebx
lea eax, [ebp + 0x18]
push eax
push edi
lea eax, [ebp - 0xc]
push 0x1002ecc8
push eax
call fcn.10012cf7
add esp, 0x14
test al, al
je 0x1001073e
push ebx
lea eax, [ebp + 0x18]
push eax
push edi
lea eax, [ebp - 0xc]
push 0x1002edd0
push eax
call fcn.10012cf7
add esp, 0x14
test al, al
je 0x1001073e
call fcn.1000ab72
push ebx
lea ecx, [ebp + 0x18]
push ecx
push edi
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.10012cf7
add esp, 0x14
test al, al
je 0x1001073e
push ebx
lea eax, [ebp + 0x18]
push eax
push edi
lea eax, [ebp - 0xc]
push 0x1002f1f0
push eax
call fcn.10012cf7
add esp, 0x14
test al, al
jne 0x1001074a
mov dword [ebp + 0x1c], 0x54f
jmp 0x10010824
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x18]
add eax, ecx
push 0x14
mov dword [edi + 4], eax
lea eax, [ebp - 0x2c]
push esi
push eax
call fcn.1001b590
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x18]
add esp, 0xc
mov dword [ebp - 0x14], eax
cmp eax, esi
mov dword [ebp + 4], edi
mov dword [ebp], eax
jbe 0x100107d2
push esi
lea eax, [ebp - 0x2c]
push eax
push esi
lea eax, [ebp + 0x10]
push eax
push 1
lea eax, [ebp]
push eax
push dword [ebp + 0x14]
mov dword [ebp + 0x10], esi
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x100107c7
mov eax, dword [ebp + 0x1d0]
call fcn.1000fc9c
cmp eax, esi
mov dword [ebp + 0x1c], eax
jne 0x10010824
lea eax, [ebp - 0x18]
push eax
push esi
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp + 0x14]
call dword [sym.imp.WS2_32.dll_WSAGetOverlappedResult]
test eax, eax
je 0x10010814
mov eax, dword [ebp + 0x10]
add dword [ebp + 4], eax
sub dword [ebp], eax
jne 0x1001077a
push esi
lea eax, [ebp - 0x14]
push eax
push ebx
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100107ed
mov eax, dword [ebp - 0x14]
cmp eax, esi
jne 0x10010770
cmp dword [ebp + 0xc], esi
je 0x10010802
push esi
push esi
push 0x8003
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_PostMessageA]
cmp dword [ebp + 0x1c], esi
jne 0x1001081f
push 2
push dword [ebp + 0x14]
call dword [sym.imp.WS2_32.dll_shutdown]
jmp 0x10010852
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp + 0x1c], eax
jmp 0x10010802
cmp dword [ebp + 8], esi
je 0x1001082f
cmp dword [ebp - 4], esi
je 0x1001082f
push dword [ebp + 0x14]
call dword [ebp - 4]
push 4
lea eax, [ebp + 8]
push eax
push 0x80
push 0xffff
push dword [ebp + 0x14]
mov word [ebp + 8], 1
mov word [ebp + 0xa], si
call dword [sym.imp.WS2_32.dll_setsockopt]
push dword [ebp + 0x14]
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [ebp - 0x30]
call fcn.1000ac7b
mov ebx, dword [ebp + 0x1d0]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push edi
call fcn.1001b588
pop ecx
jmp 0x1001087f
mov dword [ebp + 0x1c], 8
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
jmp 0x10010894
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x1c], eax
cmp dword [ebp + 0x1c], esi
je 0x100108a3
push dword [ebp + 0x1c]
mov ecx, ebx
call fcn.1000fc4e
mov ecx, dword [ebp + 0x1c0]
mov eax, dword [ebp + 0x1c]
pop esi
pop ebx
call fcn.1001b57a
add ebp, 0x1c4
leave
ret