Function at 0x1009d070
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
lea ebp, [esp - 0x214]
sub esp, 0x214
push 0xfffffffffffffffe
push 0x1016b458
push 0x10118480
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x1017455c]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x210], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov ecx, dword [ebp + 0x21c]
mov dword [ebp - 0x44], ecx
mov edi, dword [ebp + 0x220]
mov dword [ebp - 0x20], edi
xor esi, esi
mov dword [ebp - 4], esi
mov byte [ebp - 0x19], 1
mov byte [ebp + 0x208], 0
xor eax, eax
mov dword [ebp + 0x209], eax
mov byte [ebp + 0x20d], al
mov dword [ebp - 0x3c], esi
cmp ecx, esi
je 0x1009d39b
cmp byte [ecx], al
je 0x1009d39b
push str.ws2_32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x1009d387
cmp ebx, esi
je 0x1009d387
push str.htons
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call esi
mov edi, eax
push str.socket
push ebx
call esi
mov dword [ebp - 0x24], eax
push str.closesocket
push ebx
call esi
mov dword [ebp - 0x38], eax
push str.setsockopt
push ebx
call esi
mov dword [ebp - 0x40], eax
push str.sendto
push ebx
call esi
mov dword [ebp - 0x34], eax
push str.WSAStartup
push ebx
call esi
mov dword [ebp - 0x48], eax
push str.WSACleanup
push ebx
call esi
mov dword [ebp - 0x2c], eax
push str.WSAGetLastError
push ebx
call esi
mov ecx, eax
mov dword [ebp - 0x30], ecx
test edi, edi
je 0x1009d36a
mov esi, dword [ebp - 0x24]
test esi, esi
je 0x1009d36a
cmp dword [ebp - 0x38], 0
je 0x1009d36a
cmp dword [ebp - 0x40], 0
je 0x1009d36a
cmp dword [ebp - 0x34], 0
je 0x1009d36a
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x1009d36a
cmp dword [ebp - 0x2c], 0
je 0x1009d36a
test ecx, ecx
je 0x1009d36a
lea ecx, [ebp]
push ecx
push 2
call eax
test eax, eax
je 0x1009d1f0
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x1009d1e4
push eax
push str.WSAStartup_failed___d_
push ecx
call fcn.1010d6a8
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x1009d3dd
push 0x11
push 2
push 2
call esi
mov dword [ebp - 0x24], eax
cmp eax, 0xffffffff
jne 0x1009d228
mov edi, dword [ebp - 0x20]
test edi, edi
je 0x1009d219
call dword [ebp - 0x30]
push eax
push str.socket_failed___d_
push edi
call fcn.1010d6a8
add esp, 0xc
call dword [ebp - 0x2c]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x1009d3dd
push 1
lea edx, [ebp - 0x19]
push edx
push 0x20
push 0xffff
push eax
call dword [ebp - 0x40]
test eax, eax
je 0x1009d25f
mov edi, dword [ebp - 0x20]
test edi, edi
je 0x1009d34d
call dword [ebp - 0x30]
push eax
push str.setsockopt_failed___d_
push edi
call fcn.1010d6a8
add esp, 0xc
jmp 0x1009d34d
xor eax, eax
mov dword [ebp + 0x190], eax
mov dword [ebp + 0x194], eax
mov dword [ebp + 0x198], eax
mov dword [ebp + 0x19c], eax
mov eax, 2
mov word [ebp + 0x190], ax
push 0x9c40
call edi
mov word [ebp + 0x192], ax
mov dword [ebp + 0x194], 0xffffffff
mov esi, 0x10
lea ecx, [ebp + 0x208]
mov edx, dword [ebp - 0x44]
call fcn.1009cf70
test eax, eax
je 0x1009d339
xor eax, eax
mov dword [ebp - 0x28], eax
cmp eax, 6
jge 0x1009d2cd
mov byte [ebp + eax + 0x1a0], 0xff
inc eax
jmp 0x1009d2ba
xor eax, eax
mov dx, word [ebp + 0x20c]
mov edi, dword [ebp + 0x208]
mov dword [ebp - 0x28], eax
cmp eax, 0x10
jge 0x1009d2f7
lea ecx, [eax + eax*2]
lea ecx, [ebp + ecx*2 + 0x1a6]
mov dword [ecx], edi
mov word [ecx + 4], dx
inc eax
jmp 0x1009d2dc
push esi
lea ecx, [ebp + 0x190]
push ecx
push 0
push 0x66
lea edx, [ebp + 0x1a0]
push edx
mov eax, dword [ebp - 0x24]
push eax
call dword [ebp - 0x34]
test eax, eax
jge 0x1009d330
mov edi, dword [ebp - 0x20]
test edi, edi
je 0x1009d34d
call dword [ebp - 0x30]
push eax
push str.sendto_failed___d_
push edi
call fcn.1010d6a8
add esp, 0xc
jmp 0x1009d34d
mov dword [ebp - 0x3c], 1
jmp 0x1009d34d
mov edi, dword [ebp - 0x20]
test edi, edi
je 0x1009d34d
mov ecx, 6
mov esi, str.Unable_to_convert_mac...
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x24]
push ecx
call dword [ebp - 0x38]
call dword [ebp - 0x2c]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0x3c]
jmp 0x1009d3e6
mov edi, dword [ebp - 0x20]
test edi, edi
je 0x1009d37e
mov ecx, 9
mov esi, str.Failed_to_get_the_routine_address...
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x1009d3dd
cmp edi, esi
je 0x1009d3dd
mov ecx, 6
mov esi, str.failed_to_load_library...
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
jmp 0x1009d3dd
cmp edi, esi
je 0x1009d3dd
mov edx, dword [str.Invalid_Parameter...]
mov dword [edi], edx
mov eax, dword [0x10162bd4]
mov dword [edi + 4], eax
mov ecx, dword [0x10162bd8]
mov dword [edi + 8], ecx
mov edx, dword [0x10162bdc]
mov dword [edi + 0xc], edx
mov eax, dword [0x10162be0]
mov dword [edi + 0x10], eax
mov cl, byte [0x10162be4]
mov byte [edi + 0x14], cl
jmp 0x1009d3dd
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x210]
xor ecx, ebp
call fcn.1010d699
add ebp, 0x214
mov esp, ebp
pop ebp
ret 8