Function at 0x436780
Capabilities:
Convert ip address from string
Initialize winsock library

Disassembly:
sub esp, 0x1a4
mov eax, dword [0x612790]
xor eax, esp
mov dword [esp + 0x1a0], eax
mov eax, dword [esp + 0x1b0]
mov ecx, dword [esp + 0x1b8]
mov edx, dword [esp + 0x1c4]
mov dword [esp], eax
mov eax, ecx
and eax, 1
mov dword [esp + 0xc], edx
push ebx
mov ebx, dword [esp + 0x1b8]
and ecx, 2
mov dword [0x915734], eax
mov eax, dword [esp + 0x1ac]
mov dword [0x915738], ecx
mov dword [0x915730], 0
mov dword [edx], 0
push esi
mov esi, dword [esp + 0x1b4]
test eax, eax
je 0x436baf
test esi, esi
je 0x436baf
cmp byte [eax], 0
je 0x436b75
cmp byte [esi], 0
je 0x436b75
push ebp
push 0x3a8
push 1
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov ebp, eax
add esp, 8
mov dword [esp + 0x14], ebp
test ebp, ebp
jne 0x43686e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x3a8
push 0xb70
push str.bagent_init
push str.BAGENT
push str.Cannot_allocate_memory___d_octets___errno_d
push 2
push str.BAGENT
call fcn.00432050
add esp, 0x20
pop ebp
pop esi
pop ebx
mov ecx, dword [esp + 0x1a0]
xor ecx, esp
call fcn.00498b38
add esp, 0x1a4
ret
push edi
lea eax, [esp + 0x14]
push eax
push 0xff
lea eax, [ebp + 0x105]
push eax
movzx eax, byte [esi]
push eax
lea eax, [esi + 1]
push eax
call fcn.00436330
mov al, byte [esp + 0x28]
lea edi, [ebp + 4]
mov esi, dword [esp + 0x1cc]
mov ecx, 0x40
mov byte [ebp + 0x104], al
add esp, 0x14
mov eax, dword [esp + 0x1cc]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp + 0x304], eax
mov eax, dword [esp + 0x1d0]
mov dword [ebp + 0x308], eax
mov dword [ebp + 0x314], 2
call fcn.004343c0
push 0x915ce0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [esp + 0x20]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov esi, eax
test esi, esi
je 0x436939
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
push 0xb87
push str.bagent_init
push str.BAGENT
push str.Network_initialization__WSAStartup___d__errno_d
push 2
push str.BAGENT
call fcn.00432050
add esp, 0x20
pop edi
pop ebp
pop esi
pop ebx
mov ecx, dword [esp + 0x1a0]
xor ecx, esp
call fcn.00498b38
add esp, 0x1a4
ret
push 0
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp + 0x39c], eax
mov dword [ebp + 0x398], 2
mov edx, dword [esp + 0x10]
test edx, edx
je 0x4369e9
mov al, byte [edx]
test al, al
je 0x4369e9
movzx eax, al
push eax
lea eax, [edx + 1]
push eax
call fcn.004364c0
mov edx, dword [esp + 0x18]
lea edi, [ebp + 0x204]
add esp, 8
mov ecx, 0x40
mov byte [edx], al
mov eax, 2
mov esi, dword [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
mov word [ebp + 0x398], ax
lea eax, [ebp + 0x39c]
push eax
mov eax, dword [esp + 0x14]
inc eax
push eax
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jne 0x4369e9
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
lea eax, [esp + 0x15]
push eax
movzx eax, byte [esp + 0x18]
push eax
push 0xb96
push str.bagent_init
push str.BAGENT
push str.Cannot_convert__.s_to_internal_representative__errno_d
push 0
push str.BAGENT
call fcn.00432050
add esp, 0x24
test ebx, ebx
je 0x436adf
mov al, byte [ebx]
test al, al
je 0x436adf
movzx eax, al
lea esi, [ebx + 1]
push eax
push esi
call fcn.004364c0
add esp, 8
mov byte [ebx], al
xor ebx, ebx
lea edi, [ebp + 0x35c]
lea ebp, [ebx + 2]
nop dword [eax + eax]
lea eax, [esp + 0x14]
push eax
push 0x4b235c
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strtok_s]
mov esi, eax
add esp, 0xc
test esi, esi
je 0x436adb
push esi
push ebx
push 0xba8
push str.bagent_init
push str.BAGENT
push str._02.2d_:_Parse_NS__s
push dword [0x915734]
call fcn.004322d0
add esp, 0x1c
push edi
push esi
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jne 0x436a98
push esi
push 0xbae
push str.bagent_init
push str.BAGENT
push str.Cannot_convert__s_to_IPv4__skip_this_NS
push 2
push str.BAGENT
mov dword [edi], eax
call fcn.00432050
add esp, 0x1c
jmp 0x436ad0
push 0x35
call dword [sym.imp.WS2_32.dll_htons]
push esi
push ebx
push 0xbb5
push str.bagent_init
push str.BAGENT
push str.NS_server__02.2d_s
push dword [0x915734]
mov word [edi - 2], ax
mov word [edi - 4], bp
call fcn.004322d0
add esp, 0x1c
inc ebx
add edi, 0x10
xor esi, esi
cmp ebx, 4
jl 0x436a20
mov ebp, dword [esp + 0x18]
cmp dword [0x91573c], 0
mov eax, dword [esp + 0x1c]
mov dword [eax], ebp
jne 0x436b6b
push 0x120
push 0x400
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
add esp, 8
mov dword [0x91573c], eax
test eax, eax
jne 0x436b43
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x3a8
push 0xbcd
push str.bagent_init
push str.BAGENT
push str.Cannot_allocate_memory___d_octets___errno_d
push 2
push str.BAGENT
call fcn.00432050
add esp, 0x20
mov eax, 1
jmp 0x436920
push 0x400
push 0xbd0
push str.bagent_init
push str.BAGENT
push str.Created_NS_cache_for__d_entries
push 1
push str.BAGENT
call fcn.00432050
add esp, 0x1c
mov eax, 1
jmp 0x436920
push 0xb5f
push str.bagent_init
push str.BAGENT
push str.Checking_of_input_arguments
push 2
push str.BAGENT
call fcn.00432050
add esp, 0x18
pop esi
pop ebx
mov ecx, dword [esp + 0x1a0]
xor ecx, esp
call fcn.00498b38
add esp, 0x1a4
ret
push 0xb5c
push str.bagent_init
push str.BAGENT
push str.No_arguments
push 2
push str.BAGENT
call fcn.00432050
mov ecx, dword [esp + 0x1c0]
add esp, 0x18
pop esi
pop ebx
xor ecx, esp
call fcn.00498b38
add esp, 0x1a4
ret