Function at 0x4120f0
Capabilities:
Connect socket
Resolve dns

Disassembly:
push ebp
mov eax, 0x51df34
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
call fcn.0040dc30
test eax, eax
mov ebx, eax
je 0x4126d8
mov esi, dword [0x5602b4]
test esi, esi
je 0x412234
xor eax, eax
mov dword [ebp + eax - 0x38], 0
add eax, 4
cmp eax, 0x20
jb 0x41211d
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], 0x51d397
mov dword [esp + 4], 0x10
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x48]
mov dword [esp], eax
call fcn.0040bf20
lea eax, [ebp - 0x54]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x38]
mov dword [esp + 8], eax
lea eax, [ebp - 0x48]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x54], 0
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_getaddrinfo]
sub esp, 0x10
test eax, eax
je 0x412240
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [ebp - 0x50]
mov dword [esp], ecx
mov dword [ebp - 0x5c], ecx
mov dword [esp + 4], eax
call fcn.004104a0
lea eax, [ebp - 0x4c]
mov edi, eax
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x48]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 4], str.cannot_resolve_host__s_and_port__s:__s
mov dword [esp], edi
mov dword [esp + 8], eax
call fcn.0042a1c0
mov ecx, dword [ebp + 0x18]
mov dword [esp], edi
call fcn.004dbcb0
mov eax, dword [ebp - 0x4c]
lea esi, [eax - 0xc]
sub esp, 4
cmp esi, 0x516f30
jne 0x412741
mov eax, dword [ebp - 0x50]
lea esi, [eax - 0xc]
cmp esi, 0x516f30
jne 0x41270e
test byte [0x561ee0], 0x80
mov esi, dword [sym.imp.msvcrt.dll__errno]
jne 0x412320
call esi
mov edi, dword [eax]
mov eax, ebx
call fcn.0040bec0
call esi
mov edx, 0xffffffff
mov dword [eax], edi
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00410f50
jmp 0x41211b
mov edi, dword [ebp - 0x54]
mov dword [ebp - 0x54], 0
mov eax, dword [edi + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp + 4], eax
mov eax, dword [edi + 4]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_socket]
sub esp, 0xc
cmp eax, 0xffffffff
je 0x4123c0
mov dword [ebx + 0xc], eax
mov edx, dword [edi + 0x10]
mov dword [esp + 8], edx
mov edx, dword [edi + 0x18]
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.WS2_32.dll_connect]
sub esp, 0xc
cmp eax, 0xffffffff
je 0x412540
mov ecx, dword [ebx + 4]
mov edx, 0xffffffff
test ecx, ecx
je 0x4122b6
cmp ebx, 0x5602c0
jb 0x4122b6
cmp ebx, 0x561ec0
jb 0x412523
cmp dword [ebp + 0x10], 1
mov ecx, 0x51d257
mov esi, dword [ebp + 0xc]
mov eax, str.udp:
mov dword [esp + 0xc], edx
cmove eax, ecx
add ebx, 0x18
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], esi
mov dword [esp + 8], str._d_net_client:_s_d_
mov dword [esp + 4], 0x20
mov dword [esp], ebx
mov dword [ebp - 0x5c], edx
call fcn.0040bf20
mov edx, dword [ebp - 0x5c]
test byte [0x561ee0], 0x80
jne 0x412450
mov dword [ebp - 0x5c], edx
mov dword [esp], edi
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov edx, dword [ebp - 0x5c]
mov eax, edx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call esi
mov eax, dword [eax]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
mov dword [esp + 4], 0x51d271
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x60]
mov dword [esp], eax
call fcn.0042a1c0
mov edi, dword [ebp - 0x5c]
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov ecx, edi
mov dword [esp + 4], 0x365
mov dword [esp], str.system_core_adb_sysdeps_win32.cpp
call fcn.0042a560
mov ecx, edi
sub esp, 0x14
call fcn.0042a6d0
mov edx, dword [ebp - 0x4c]
mov ecx, dword [edx - 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 8], ecx
call fcn.00505c10
mov ecx, edi
call fcn.0042a790
mov eax, dword [ebp - 0x4c]
lea ecx, [eax - 0xc]
cmp ecx, 0x516f30
jne 0x4127f5
call esi
mov ecx, dword [ebp - 0x64]
mov dword [eax], ecx
jmp 0x412216
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea esi, [ebp - 0x50]
mov dword [esp], esi
mov dword [ebp - 0x5c], esi
mov dword [esp + 4], eax
call fcn.004104a0
lea eax, [ebp - 0x4c]
mov esi, eax
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x50]
mov dword [esp], esi
mov dword [esp + 4], str.cannot_create_socket:__s
mov dword [esp + 8], eax
call fcn.0042a1c0
mov ecx, dword [ebp + 0x18]
mov dword [esp], esi
call fcn.004dbcb0
mov eax, dword [ebp - 0x4c]
lea esi, [eax - 0xc]
sub esp, 4
cmp esi, 0x516f30
jne 0x4127a7
mov eax, dword [ebp - 0x50]
lea esi, [eax - 0xc]
cmp esi, 0x516f30
jne 0x412774
test byte [0x561ee0], 0x80
mov esi, dword [sym.imp.msvcrt.dll__errno]
jne 0x412690
mov dword [esp], edi
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
sub esp, 4
jmp 0x412216
mov esi, dword [sym.imp.msvcrt.dll__errno]
call esi
mov ecx, 0x51d24e
mov edx, dword [ebp - 0x5c]
cmp dword [ebp + 0x10], 1
mov dword [ebp - 0x64], edx
mov eax, dword [eax]
mov dword [esp + 0x14], edx
mov dword [ebp - 0x60], eax
mov eax, 0x51d24a
cmove eax, ecx
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x4c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp], ecx
mov dword [esp + 4], str.host__s_port__d_type__s___fd__d
mov dword [esp + 8], eax
call fcn.0042a1c0
lea eax, [ebp - 0x50]
mov ecx, eax
mov ebx, eax
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0x38a
mov dword [esp], str.system_core_adb_sysdeps_win32.cpp
mov dword [ebp - 0x5c], eax
call fcn.0042a560
mov ecx, ebx
sub esp, 0x14
call fcn.0042a6d0
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ecx - 0xc]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 8], edx
call fcn.00505c10
mov ecx, ebx
call fcn.0042a790
mov eax, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x64]
lea ecx, [eax - 0xc]
cmp ecx, 0x516f30
jne 0x412822
mov dword [ebp - 0x5c], edx
call esi
mov ebx, dword [ebp - 0x60]
mov edx, dword [ebp - 0x5c]
mov dword [eax], ebx
jmp 0x412304
mov edx, ebx
sub edx, 0x5602c0
sar edx, 3
imul edx, edx, 0xb6db6db7
add edx, 0x64
jmp 0x4122b6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [ebp - 0x50]
mov dword [esp], ecx
mov dword [ebp - 0x5c], ecx
mov dword [esp + 4], eax
call fcn.004104a0
lea eax, [ebp - 0x4c]
mov esi, eax
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x48]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp], esi
mov dword [esp + 4], str.cannot_connect_to__s:_s:__s
mov dword [esp + 8], eax
call fcn.0042a1c0
mov ecx, dword [ebp + 0x18]
mov dword [esp], esi
call fcn.004dbcb0
mov eax, dword [ebp - 0x4c]
lea esi, [eax - 0xc]
sub esp, 4
cmp esi, 0x516f30
jne 0x4128c7
mov eax, dword [ebp - 0x50]
lea esi, [eax - 0xc]
cmp esi, 0x516f30
jne 0x412895
test byte [0x561ee0], 0x80
mov esi, dword [sym.imp.msvcrt.dll__errno]
je 0x41243c
call esi
mov edx, 0x51d24e
cmp dword [ebp + 0x10], 1
mov eax, dword [eax]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax]
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 0x14], ecx
mov dword [esp + 4], str.could_not_connect_to__s:_s:_s:__s
mov dword [ebp - 0x68], eax
mov eax, 0x51d24a
mov ecx, dword [ebp - 0x68]
cmove eax, edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x60]
lea edx, [ebp - 0x48]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
mov dword [esp], eax
call fcn.0042a1c0
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0x382
mov ecx, dword [ebp - 0x5c]
mov dword [esp], str.system_core_adb_sysdeps_win32.cpp
call fcn.0042a560
mov ecx, dword [ebp - 0x5c]
sub esp, 0x14
call fcn.0042a6d0
mov edx, dword [ebp - 0x4c]
mov ecx, dword [edx - 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 8], ecx
call fcn.00505c10
mov ecx, dword [ebp - 0x5c]
call fcn.0042a790
mov eax, dword [ebp - 0x4c]
lea ecx, [eax - 0xc]
cmp ecx, 0x516f30
jne 0x41290b
call esi
mov ecx, dword [ebp - 0x64]
mov dword [eax], ecx
jmp 0x41243c
call esi
mov eax, dword [eax]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
mov dword [esp + 4], 0x51d271
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x60]
mov dword [esp], eax
call fcn.0042a1c0
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0x374
jmp 0x41263a
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_strerror
mov dword [esp], eax
mov ebx, eax
call sub.msvcrt.dll_strlen
mov ecx, dword [ebp + 0x18]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.004dc2a0
mov edx, 0xffffffff
sub esp, 8
jmp 0x41222a
cmp dword [0x5112ac], 0
jne 0x4127e7
mov edx, dword [eax - 4]
lea ecx, [edx - 1]
mov dword [eax - 4], ecx
mov eax, edx
test eax, eax
jg 0x412203
mov eax, dword [ebp - 0x60]
mov ecx, esi
mov dword [esp], eax
call fcn.004dba20
push edx
jmp 0x412203
cmp dword [0x5112ac], 0
jne 0x4127da
mov edx, dword [eax - 4]
lea ecx, [edx - 1]
mov dword [eax - 4], ecx
mov eax, edx
test eax, eax
jg 0x4121f1
lea eax, [ebp - 0x55]
mov ecx, esi
mov dword [esp], eax
call fcn.004dba20
push ecx
jmp 0x4121f1
cmp dword [0x5112ac], 0
jne 0x412866
mov edx, dword [eax - 4]
lea ecx, [edx - 1]
mov dword [eax - 4], ecx
mov eax, edx
test eax, eax
jg 0x412429
mov eax, dword [ebp - 0x60]
mov ecx, esi
mov dword [esp], eax
call fcn.004dba20
push eax
jmp 0x412429
cmp dword [0x5112ac], 0
jne 0x412941
mov edx, dword [eax - 4]
lea ecx, [edx - 1]
mov dword [eax - 4], ecx
mov eax, edx
test eax, eax
jg 0x412417
lea eax, [ebp - 0x55]
mov ecx, esi
mov dword [esp], eax
call fcn.004dba20
push eax
jmp 0x412417
sub eax, 4
call fcn.0050df71
jmp 0x412759
sub eax, 4
call fcn.0050df71
nop
jmp 0x412726
cmp dword [0x5112ac], 0
jne 0x412873
mov edx, dword [eax - 4]
lea edi, [edx - 1]
mov dword [eax - 4], edi
mov eax, edx
test eax, eax
jg 0x4123ad
mov eax, dword [ebp - 0x5c]
mov dword [esp], eax
call fcn.004dba20
push eax
jmp 0x4123ad
cmp dword [0x5112ac], 0
lea ebx, [eax - 4]
jne 0x412883
mov ebx, dword [eax - 4]
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x68], edx
lea eax, [ebx - 1]
mov edx, eax
mov eax, dword [ebp - 0x64]
mov dword [eax - 4], edx
mov edx, dword [ebp - 0x68]
mov eax, ebx
test eax, eax
jg 0x412511
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x64], edx
mov dword [esp], eax
call fcn.004dba20
mov edx, dword [ebp - 0x64]
push eax
jmp 0x412511
sub eax, 4
call fcn.0050df71
jmp 0x41278c
sub eax, 4
mov dword [ebp - 0x60], ecx
call fcn.0050df71
mov ecx, dword [ebp - 0x60]
jmp 0x412809
mov eax, ebx
mov dword [ebp - 0x68], ecx
call fcn.0050df71
mov edx, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x68]
jmp 0x412847
cmp dword [0x5112ac], 0
lea edx, [eax - 4]
jne 0x4128f9
mov ecx, dword [eax - 4]
lea edx, [ecx - 1]
mov dword [eax - 4], edx
mov eax, ecx
test eax, eax
jg 0x4125b9
mov eax, dword [ebp - 0x60]
mov ecx, esi
mov dword [esp], eax
call fcn.004dba20
push eax
jmp 0x4125b9
cmp dword [0x5112ac], 0
lea edx, [eax - 4]
jne 0x412902
mov ecx, dword [eax - 4]
lea edx, [ecx - 1]
mov dword [eax - 4], edx
mov eax, ecx
test eax, eax
jg 0x4125a7
lea eax, [ebp - 0x55]
mov ecx, esi
mov dword [esp], eax
call fcn.004dba20
push eax
jmp 0x4125a7
mov eax, edx
call fcn.0050df71
jmp 0x4128ac
mov eax, edx
call fcn.0050df71
jmp 0x4128de
cmp dword [0x5112ac], 0
lea edx, [eax - 4]
jne 0x41294e
mov edx, eax
mov eax, dword [eax - 4]
mov dword [ebp - 0x60], eax
sub eax, 1
mov dword [edx - 4], eax
mov eax, dword [ebp - 0x60]
test eax, eax
jg 0x412684
mov eax, dword [ebp - 0x5c]
mov dword [esp], eax
call fcn.004dba20
push eax
jmp 0x412684
sub eax, 4
call fcn.0050df71
jmp 0x4127bf
mov eax, edx
mov dword [ebp - 0x60], ecx
call fcn.0050df71
mov ecx, dword [ebp - 0x60]
jmp 0x412928