Function at 0x5d2130
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x2c4
mov eax, dword [0x6a21bc]
xor eax, esp
mov dword [esp + 0x2c0], eax
mov eax, dword [esp + 0x2c8]
mov ecx, dword [esp + 0x2cc]
push ebx
push ebp
mov ebp, dword [esp + 0x2e4]
mov ebx, dword [ebp]
xor edx, edx
cmp dword [ebp + 0xd0], 5
push esi
sete dl
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x2e4]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x2dc]
push edi
mov edi, dword [ebp + eax*4 + 0x198]
mov esi, edx
mov eax, ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x2c], esi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x5d21a0
mov ebx, dword [ebx + 0x174]
sub eax, ecx
mov dword [esp + 0x34], eax
test esi, esi
jne 0x5d21c6
cmp eax, 0xff
jbe 0x5d21c6
mov dword [esp + 0x2c], 1
mov eax, dword [esp + 0x10]
push 1
push 0
push eax
call fcn.005c2830
mov esi, eax
add esp, 0xc
test esi, esi
jns 0x5d21f6
mov ecx, dword [esp + 0x10]
push str.Connection_time_out
push ecx
call fcn.005bfec0
mov eax, 0x1c
jmp 0x5d287d
push 1
push edi
call fcn.005d3fa0
push esi
push edi
push 0xffffffffffffffff
push 0xffffffffffffffff
call fcn.005b6790
add esp, 0x18
cmp eax, 0xffffffff
jne 0x5d221f
mov edx, dword [ebp]
push str.SOCKS5:_no_connection_here
push edx
jmp 0x5d2873
test eax, eax
jne 0x5d223b
mov eax, dword [ebp]
push str.SOCKS5:_connection_timeout
push eax
call fcn.005bfec0
mov eax, 0x1c
jmp 0x5d287d
test al, 4
je 0x5d224c
mov ecx, dword [ebp]
push str.SOCKS5:_error_occurred_during_connection
jmp 0x5d2872
test bl, 1
jne 0x5d2259
mov dword [esp + 0x1c], 0
cmp dword [esp + 0x1c], 0
mov byte [esp + 0x38], 5
mov byte [esp + 0x3a], 0
mov eax, 3
je 0x5d2279
mov byte [esp + 0x3b], 2
mov eax, 4
sub al, 2
push 0
push edi
mov byte [esp + 0x41], al
call fcn.005d3fa0
movzx eax, byte [esp + 0x41]
lea edx, [esp + 0x28]
push edx
add eax, 2
push eax
lea ecx, [esp + 0x48]
push ecx
push edi
push ebp
call fcn.005c0570
add esp, 0x1c
test eax, eax
jne 0x5d2869
movzx edx, byte [esp + 0x39]
add edx, 2
cmp dword [esp + 0x20], edx
jne 0x5d2869
push 1
push edi
call fcn.005d3fa0
push esi
push 0xffffffffffffffff
push 0xffffffffffffffff
push edi
call fcn.005b6790
add esp, 0x18
cmp eax, 0xffffffff
jne 0x5d22e7
mov eax, dword [ebp]
push str.SOCKS5_nothing_to_read
push eax
jmp 0x5d2873
test eax, eax
jne 0x5d2303
mov ecx, dword [ebp]
push str.SOCKS5_read_timeout
push ecx
call fcn.005bfec0
mov eax, 0x1c
jmp 0x5d287d
test al, 4
je 0x5d231f
mov edx, dword [ebp]
push str.SOCKS5_read_error_occurred
push edx
call fcn.005bfec0
mov eax, 0x38
jmp 0x5d287d
push 0
push edi
call fcn.005d3fa0
lea eax, [esp + 0x20]
push eax
push 2
lea ecx, [esp + 0x48]
push ecx
push edi
push ebp
call fcn.005d1c50
add esp, 0x1c
test eax, eax
jne 0x5d285d
cmp dword [esp + 0x18], 2
jne 0x5d285d
cmp byte [esp + 0x38], 5
je 0x5d2366
mov edx, dword [esp + 0x10]
push str.Received_invalid_version_in_initial_SOCKS5_response.
push edx
jmp 0x5d2873
mov al, byte [esp + 0x39]
test al, al
je 0x5d248b
cmp al, 2
jne 0x5d281d
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x5d23b1
cmp dword [esp + 0x24], 0
je 0x5d23b1
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5d2390
sub eax, edx
mov ebx, eax
mov eax, dword [esp + 0x24]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5d23a2
sub eax, edx
mov dword [esp + 0x14], eax
jmp 0x5d23b9
xor ebx, ebx
mov dword [esp + 0x14], ebx
mov eax, ebx
mov ecx, dword [esp + 0x1c]
mov byte [esp + 0x38], 1
mov byte [esp + 0x39], bl
test ecx, ecx
je 0x5d23e1
test ebx, ebx
je 0x5d23e1
push ebx
push ecx
lea eax, [esp + 0x42]
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x20]
add esp, 0xc
lea esi, [ebx + 2]
mov byte [esp + esi + 0x38], al
inc esi
cmp dword [esp + 0x24], 0
je 0x5d240b
test eax, eax
je 0x5d240b
mov ecx, dword [esp + 0x24]
push eax
push ecx
lea edx, [esp + esi + 0x40]
push edx
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x20]
add esp, 0xc
add esi, eax
lea eax, [esp + 0x20]
push eax
push esi
lea ecx, [esp + 0x40]
push ecx
push edi
push ebp
call fcn.005c0570
add esp, 0x14
test eax, eax
jne 0x5d2816
cmp esi, dword [esp + 0x20]
jne 0x5d2816
lea edx, [esp + 0x18]
push edx
push 2
lea eax, [esp + 0x40]
push eax
push edi
push ebp
call fcn.005d1c50
add esp, 0x14
test eax, eax
jne 0x5d280a
cmp dword [esp + 0x18], 2
jne 0x5d280a
mov al, byte [esp + 0x39]
test al, al
je 0x5d248b
movzx edx, byte [esp + 0x38]
movzx ecx, al
mov eax, dword [esp + 0x10]
push ecx
push edx
push str.User_was_rejected_by_the_SOCKS5_server___d__d_.
push eax
call fcn.005bfec0
add esp, 0x10
mov eax, 7
jmp 0x5d2880
cmp dword [esp + 0x2c], 0
mov ecx, dword [esp + 0x28]
mov word [esp + 0x38], 0x105
mov byte [esp + 0x3a], 0
mov esi, 3
jne 0x5d2550
mov ebx, dword [esp + 0x34]
push ebx
push ecx
lea edx, [esp + 0x45]
push edx
mov byte [esp + 0x47], 3
mov byte [esp + 0x48], bl
call sub.msvcrt.dll_memcpy
lea esi, [ebx + 5]
mov ebx, dword [esp + 0x2f0]
add esp, 0xc
mov edi, dword [esp + 0x10]
mov eax, ebx
sar eax, 8
mov byte [esp + esi + 0x38], al
mov byte [esp + esi + 0x39], bl
mov ebx, dword [esp + 0x30]
lea ecx, [esp + 0x20]
push ecx
add esi, 2
push esi
lea edx, [esp + 0x40]
push edx
push ebx
push ebp
call fcn.005c0570
add esp, 0x14
test eax, eax
jne 0x5d2802
cmp esi, dword [esp + 0x20]
jne 0x5d2802
lea esi, [eax + 0xa]
lea eax, [esp + 0x18]
push eax
push esi
lea ecx, [esp + 0x40]
push ecx
push ebx
push ebp
call fcn.005d1c50
add esp, 0x14
test eax, eax
jne 0x5d27fa
cmp dword [esp + 0x18], esi
jne 0x5d27fa
cmp byte [esp + 0x38], 5
je 0x5d2667
push str.SOCKS5_reply_has_wrong_version__version_should_be_5.
push edi
jmp 0x5d2873
mov ebx, dword [esp + 0x2e4]
lea eax, [esp + 0x14]
push eax
push ebx
push ecx
push ebp
call fcn.005b7a80
add esp, 0x10
cmp eax, 0xffffffff
je 0x5d265d
cmp eax, 1
jne 0x5d258b
lea edx, [esp + 0x14]
push edx
push ebp
call fcn.005b7350
add esp, 8
test eax, eax
jne 0x5d2880
mov eax, dword [esp + 0x14]
test eax, eax
je 0x5d2646
mov edi, dword [eax]
test edi, edi
je 0x5d2646
push 0x40
lea eax, [esp + 0x294]
push eax
push edi
call fcn.005b7750
mov eax, dword [edi + 4]
add esp, 0xc
cmp eax, 2
jne 0x5d25eb
mov byte [esp + 0x3b], 1
mov eax, dword [edi + 0x18]
movzx ecx, byte [eax + 4]
mov byte [esp + 0x3c], cl
movzx edx, byte [eax + 5]
mov byte [esp + 0x3d], dl
movzx ecx, byte [eax + 6]
mov byte [esp + 0x3e], cl
movzx edx, byte [eax + 7]
mov byte [esp + 0x3f], dl
mov esi, 8
jmp 0x5d262c
cmp eax, 0x17
jne 0x5d2610
xor eax, eax
mov byte [esp + 0x3b], 4
mov ecx, dword [edi + 0x18]
lea esi, [eax + 0x14]
lea ecx, [ecx]
mov dl, byte [ecx + eax + 8]
mov byte [esp + eax + 0x3c], dl
inc eax
cmp eax, 0x10
jl 0x5d2600
jmp 0x5d262c
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x290]
push eax
push str.SOCKS5_connection_to__s_not_supported_n
push ecx
xor edi, edi
call fcn.005bfec0
add esp, 0xc
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push edx
push eax
call fcn.005b7ef0
add esp, 8
test edi, edi
jne 0x5d24d1
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x10]
push ecx
push str.Failed_to_resolve___s__for_SOCKS5_connect.
push edx
call fcn.005bfec0
add esp, 0xc
mov eax, 6
jmp 0x5d2880
mov al, byte [esp + 0x3b]
cmp al, 3
jne 0x5d26a8
movzx esi, byte [esp + 0x3c]
add esi, 7
cmp esi, 0xa
jle 0x5d26bb
lea edx, [esp + 0x18]
push edx
lea edi, [esi - 0xa]
push edi
lea eax, [esp + 0x4a]
push eax
push ebx
push ebp
call fcn.005d1c50
add esp, 0x14
test eax, eax
jne 0x5d269e
cmp edi, dword [esp + 0x18]
je 0x5d26b3
push str.Failed_to_receive_SOCKS5_connect_request_ack.
jmp 0x5d286e
cmp al, 4
jne 0x5d26bb
mov esi, 0x16
jmp 0x5d267c
mov al, byte [esp + 0x3b]
mov edi, dword [esp + 0x10]
mov cl, byte [esp + 0x39]
test cl, cl
je 0x5d27e8
cmp al, 1
jne 0x5d270f
movzx eax, byte [esp + 0x40]
movzx edx, cl
movzx ecx, byte [esp + 0x41]
push edx
movzx edx, byte [esp + 0x43]
shl eax, 8
or eax, ecx
movzx ecx, byte [esp + 0x41]
push eax
movzx eax, byte [esp + 0x46]
push edx
movzx edx, byte [esp + 0x48]
push eax
push ecx
push edx
push str.Cant_complete_SOCKS5_connection_to__d._d._d._d:_d.___d_
push edi
call fcn.005bfec0
add esp, 0x20
mov eax, 7
jmp 0x5d2880
cmp al, 3
jne 0x5d2754
mov bl, byte [esp + esi + 0x36]
movzx ecx, byte [esp + esi + 0x37]
lea esi, [esp + esi + 0x38]
mov byte [esi - 2], 0
movzx eax, byte [esp + 0x39]
movzx edx, bl
push eax
shl edx, 8
or ecx, edx
push ecx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x45]
push eax
push str.Cant_complete_SOCKS5_connection_to__s:_d.___d_
push ecx
call fcn.005bfec0
add esp, 0x14
mov eax, 7
jmp 0x5d2880
cmp al, 4
jne 0x5d27de
movzx eax, byte [esp + 0x4c]
movzx edx, cl
movzx ecx, byte [esp + 0x4d]
push edx
movzx edx, byte [esp + 0x4f]
shl eax, 8
or eax, ecx
movzx ecx, byte [esp + 0x4d]
push eax
movzx eax, byte [esp + 0x52]
push edx
movzx edx, byte [esp + 0x54]
push eax
movzx eax, byte [esp + 0x57]
push ecx
movzx ecx, byte [esp + 0x5a]
push edx
movzx edx, byte [esp + 0x5d]
push eax
movzx eax, byte [esp + 0x60]
push ecx
movzx ecx, byte [esp + 0x63]
push edx
movzx edx, byte [esp + 0x66]
push eax
movzx eax, byte [esp + 0x69]
push ecx
movzx ecx, byte [esp + 0x6c]
push edx
movzx edx, byte [esp + 0x6f]
push eax
movzx eax, byte [esp + 0x72]
push ecx
movzx ecx, byte [esp + 0x75]
push edx
movzx edx, byte [esp + 0x78]
push eax
push ecx
push edx
push str.Cant_complete_SOCKS5_connection_to__02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_d.___d_
push edi
call fcn.005bfec0
add esp, 0x50
mov eax, 7
jmp 0x5d2880
push 1
push ebx
call fcn.005d3fa0
add esp, 8
xor eax, eax
jmp 0x5d2880
push str.Failed_to_receive_SOCKS5_connect_request_ack.
push edi
jmp 0x5d2873
push str.Failed_to_send_SOCKS5_connect_request.
push edi
jmp 0x5d2873
mov eax, dword [esp + 0x10]
push str.Unable_to_receive_SOCKS5_sub_negotiation_response.
push eax
jmp 0x5d2873
push str.Failed_to_send_SOCKS5_sub_negotiation_request.
jmp 0x5d286e
cmp al, 1
jne 0x5d282d
mov edx, dword [esp + 0x10]
push str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
push edx
jmp 0x5d2873
cmp al, 0xff
jne 0x5d2851
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x5d284a
cmp byte [eax], 0
je 0x5d284a
mov eax, dword [esp + 0x10]
push str.No_authentication_method_was_acceptable.
push eax
jmp 0x5d2873
push str.No_authentication_method_was_acceptable.__It_is_quite_likely_that_the_SOCKS5_server_wanted_a_username_password__since_none_was_supplied_to_the_server_on_this_connection._
jmp 0x5d286e
mov edx, dword [esp + 0x10]
push str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
push edx
jmp 0x5d2873
mov eax, dword [esp + 0x10]
push str.Unable_to_receive_initial_SOCKS5_response.
push eax
jmp 0x5d2873
push str.Unable_to_send_initial_SOCKS5_request.
mov ecx, dword [esp + 0x14]
push ecx
call fcn.005bfec0
mov eax, 7
add esp, 8
mov ecx, dword [esp + 0x2d0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005211a0
add esp, 0x2c4
ret