Function at 0x10121e7
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
cmp dword [ebp + 0xc], 0
push esi
mov esi, ecx
jne 0x101210f
mov eax, 0x80070057
jmp 0x10123a9
push ebx
push edi
push 0
push 3
lea ecx, reloc.KERNEL32.dll_GetStartupInfoA
call fcn.01016f39
mov ecx, dword [esi + reloc.KERNEL32.dll_GetStartupInfoA]
mov eax, dword [esi + 0xc]
mov edi, dword [ebp + 0x10]
mov ebx, dword [esi + reloc.KERNEL32.dll_GetStartupInfoA]
or dword [esi + 0xc], 0xffffffff
shr edi, 3
mov dword [ebp - 4], eax
shl edi, 4
mov eax, ecx
xor edi, ecx
shl eax, 0x1e
sar eax, 0x1f
and edi, 0x10
xor edi, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
shl ebx, 0x1b
mov dword [esi + reloc.KERNEL32.dll_GetStartupInfoA], edi
movzx ecx, word [eax]
sar ebx, 0x1f
dec ecx
dec ecx
je 0x101219c
sub ecx, 0x15
je 0x1012176
mov ebx, 0x80070057
jmp 0x101235b
xor ecx, ecx
cmp dword [ebp + 8], 6
push eax
setne cl
mov dword [ebp - 0xc], 0x1c
inc ecx
mov dword [ebp - 8], ecx
call fcn.010117d5
xor ecx, ecx
test eax, eax
mov eax, dword [ebp + 0xc]
sete cl
jmp 0x10121b8
xor ecx, ecx
cmp dword [ebp + 8], 6
mov dword [ebp - 0xc], 0x10
setne cl
inc ecx
mov dword [ebp - 8], ecx
xor ecx, ecx
cmp dword [eax + 4], ecx
setne cl
shl ecx, 1
xor ecx, edi
and ecx, 2
xor edx, edx
xor ecx, edi
inc edx
cmp dword [ebp + 8], 0x11
mov dword [esi + reloc.KERNEL32.dll_GetStartupInfoA], ecx
jne 0x10121d3
push 0x15
pop edx
mov ecx, dword [reloc.KERNEL32.dll_GetStartupInfoA]
test ecx, ecx
movzx eax, word [eax]
je 0x10121f0
push edx
push 0
push 0
push dword [ebp + 8]
push dword [ebp - 8]
push eax
call ecx
jmp 0x10121fd
push dword [ebp + 8]
push dword [ebp - 8]
push eax
call dword [sym.imp.WSOCK32.dll_socket]
cmp eax, reloc.KERNEL32.dll_GetStartupInfoA
mov dword [esi + 0xc], eax
jne 0x101222d
mov edi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
call edi
test eax, eax
jg 0x1012218
call edi
jmp 0x101231d
call edi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
jmp 0x101235b
mov ecx, dword [ebp + 0x10]
shr ecx, 1
not ecx
and ecx, 1
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp + 0xc]
cmp word [ecx], 0x16
mov edi, 0xffff
je 0x1012261
push 4
lea ecx, [ebp - 0x10]
push ecx
push 4
push edi
push eax
call dword [sym.imp.WSOCK32.dll_setsockopt]
cmp eax, reloc.KERNEL32.dll_GetStartupInfoA
je 0x101230f
cmp dword [ebp + 8], 0x11
jne 0x1012286
test byte [ebp + 0x10], 4
je 0x1012286
push 4
lea eax, [ebp + 0x10]
push eax
push 0xfffffffffffffffb
push edi
push dword [esi + 0xc]
mov dword [ebp + 0x10], 1
call dword [sym.imp.WSOCK32.dll_setsockopt]
push dword [ebp - 0xc]
push dword [ebp + 0xc]
push dword [esi + 0xc]
call dword [sym.imp.WSOCK32.dll_bind]
cmp eax, reloc.KERNEL32.dll_GetStartupInfoA
jne 0x10122f2
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
cmp eax, 0x271d
je 0x10122ae
cmp eax, 0x2740
jne 0x101230f
cmp dword [ebp - 4], reloc.KERNEL32.dll_GetStartupInfoA
je 0x101230f
cmp dword [ebp - 0x10], 0
je 0x101230f
push dword [esi + 0xc]
call dword [sym.imp.WSOCK32.dll_closesocket]
mov eax, dword [ebp - 4]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x14]
and ebx, 1
and eax, 1
shl ebx, 3
or ebx, eax
mov eax, dword [esi + reloc.KERNEL32.dll_GetStartupInfoA]
and eax, 0xffffffed
shl ebx, 1
or ebx, eax
xor eax, eax
mov dword [esi + reloc.KERNEL32.dll_GetStartupInfoA], ebx
inc eax
jmp 0x10123a7
lea eax, [ebp - 0x18]
push eax
lea eax, [esi + 0x18]
push eax
push dword [esi + 0xc]
mov dword [ebp - 0x18], 0x80
call dword [sym.imp.WSOCK32.dll_getsockname]
cmp eax, reloc.KERNEL32.dll_GetStartupInfoA
jne 0x101232c
mov ebx, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
call ebx
test eax, eax
jg 0x1012321
call ebx
mov ebx, eax
jmp 0x101235b
call ebx
mov ebx, eax
and ebx, edi
jmp 0x1012222
and dword [esi + reloc.KERNEL32.dll_GetStartupInfoA], 0xfffffff7
cmp dword [ebp + 8], 5
jne 0x1012348
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x44]
mov dword [esi + 0x5c], ecx
mov eax, dword [eax + 0x48]
mov dword [esi + 0x60], eax
push dword [ebp - 8]
mov ecx, esi
push dword [ebp + 8]
call fcn.01011a35
mov ebx, eax
test ebx, ebx
jge 0x1012383
cmp dword [ebp - 4], reloc.KERNEL32.dll_GetStartupInfoA
je 0x101236c
lea eax, [ebp - 4]
push eax
mov ecx, esi
call fcn.01011fa2
mov eax, dword [esi + 0xc]
cmp eax, reloc.KERNEL32.dll_GetStartupInfoA
je 0x101237f
push eax
call dword [sym.imp.WSOCK32.dll_closesocket]
or dword [esi + 0xc], 0xffffffff
mov eax, ebx
jmp 0x10123a7
cmp dword [reloc.KERNEL32.dll_GetStartupInfoA], 0
jne 0x1012394
push dword [esi + 0xc]
call fcn.0101182e
cmp dword [ebp - 4], reloc.KERNEL32.dll_GetStartupInfoA
je 0x10123a5
lea eax, [ebp - 4]
push eax
mov ecx, esi
call fcn.01011fa2
xor eax, eax
pop edi
pop ebx
pop esi
leave
ret 0xc