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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x150
mov edi, edx
mov esi, ecx
mov eax, dword [esp + 0x164]
mov ecx, dword [esp + 0x168]
xorps xmm0, xmm0
movups xmmword [esp + 0x6c], xmm0
movups xmmword [esp + 0x5c], xmm0
lea edx, [esp + 0x5c]
push 8
push edx
push ecx
push eax
push dword [0x444450]
call fcn.00405660
add esp, 0x14
test eax, eax
jle 0x40316d
mov dword [esp + 8], edi
mov ebp, dword [esp + 0x64]
mov eax, dword [esp + 0x68]
sub eax, ebp
cmp eax, 4
mov edi, 4
cmovl edi, eax
lea eax, [edi - 5]
neg eax
xor ebx, ebx
cmp edi, 5
xorps xmm0, xmm0
movsd qword [esp + 0x148], xmm0
xorps xmm0, xmm0
movups xmmword [esp + 0x138], xmm0
movups xmmword [esp + 0x128], xmm0
movups xmmword [esp + 0x118], xmm0
movups xmmword [esp + 0x108], xmm0
movups xmmword [esp + 0xf8], xmm0
movups xmmword [esp + 0xe8], xmm0
movups xmmword [esp + 0xd8], xmm0
movups xmmword [esp + 0xc8], xmm0
movups xmmword [esp + 0xb8], xmm0
movups xmmword [esp + 0xa8], xmm0
movups xmmword [esp + 0x98], xmm0
movups xmmword [esp + 0x88], xmm0
cmovae eax, ebx
lea ecx, [esp + edi]
add ecx, 0x1b
push eax
push 0
push ecx
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [esp + 0x1b]
push edi
push ebp
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x70]
sub ecx, eax
cmp ecx, 0xc7
mov edx, 0xc7
cmovl edx, ecx
lea ecx, [esp + 0x88]
push edx
push eax
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov edi, dword [esp + 0x74]
mov eax, dword [esp + 0x78]
sub eax, edi
cmp eax, 9
mov ebp, 9
cmovl ebp, eax
lea eax, [ebp - 0xa]
neg eax
cmp ebp, 0xa
cmovae eax, ebx
lea ecx, [esp + ebp]
add ecx, 0x7e
push eax
push 0
push ecx
call sub.msvcrt.dll_memset
add esp, 0xc
lea ebx, [esp + 0x7e]
push ebp
push edi
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
push ebx
call sub.msvcrt.dll_atoi
add esp, 4
cmp dword [esp + 0x1b], 0x504354
je 0x402fb8
cmp dword [esp + 0x1b], 0x504455
mov ebp, dword [esp + 8]
jne 0x403055
push eax
lea eax, [esp + 0x8c]
push eax
push dword [0x442d40]
call fcn.00408480
add esp, 0xc
test eax, eax
je 0x403055
mov ebx, eax
cmp word [0x444000], 0
je 0x402fe7
mov edi, dword [ebx + 0x30]
push 0x444000
call fcn.00405d30
add esp, 4
push eax
push 0x444000
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x402fe7
push ebx
call fcn.00409390
add esp, 4
jmp 0x403055
mov ecx, dword [0x442d40]
lea edx, [esp + 0x88]
push 0x403630
push fcn.00403540
push 0x100000
push eax
call fcn.00401d50
add esp, 0x10
mov ebx, eax
test eax, eax
mov ebp, dword [esp + 8]
je 0x403055
mov ebp, dword [0x442d48]
test ebp, ebp
je 0x403178
push 0x10
call sub.msvcrt.dll_malloc
add esp, 4
movzx ecx, word [esp + 8]
mov dword [eax + 4], ecx
mov dword [eax], esi
mov byte [eax + 8], 1
mov dword [ebx + 0x14], eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0x1c]
mov eax, ecx
and eax, esi
mov edi, dword [edx + eax*8]
mov dword [esp + 0x58], edx
cmp dword [edx + eax*8 + 4], esi
je 0x403295
test edi, edi
mov dword [esp + 4], ebx
jne 0x4032fa
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x403231
mov edx, dword [ebp + 0x20]
mov edi, ecx
shl edi, 4
mov edi, dword [edx + edi]
mov dword [ebp + 0x14], edi
jmp 0x40323d
movups xmm0, xmmword [str._connect_failed_]
movups xmmword [esp + 0x38], xmm0
mov byte [esp + 0x48], 0
mov word [esp + 0x20], 0x9882
push 0xffff
push 0
call fcn.00405b30
add esp, 8
lea ebx, [esp + 0x22]
mov word [esp + 0x22], ax
push 0xffff
push 0
call fcn.00405b30
add esp, 8
mov word [esp + 0x24], ax
lea eax, [esp + 0x26]
bswap esi
bswap ebp
shrd ebp, esi, 0x10
mov word [esp + 0x26], 0x3407
shr esi, 0x10
mov word [esp + 0x2c], si
mov dword [esp + 0x28], ebp
push 0
push ebx
push 8
push eax
push eax
call fcn.00409b80
add esp, 0x14
movzx eax, al
lea edi, [esp + 0x38]
push eax
push ebx
push 0x10
push edi
push edi
call fcn.00409b80
add esp, 0x14
lea eax, [esp + 0x20]
push 0xe
push eax
push dword [0x443e9c]
call fcn.00409040
add esp, 0xc
push 0x10
push edi
push dword [0x443e9c]
call fcn.00409040
add esp, 0xc
mov word [esp + 0x20], 0x8882
push 0xffff
push 0
call fcn.00405b30
add esp, 8
lea edi, [esp + 0x22]
mov word [esp + 0x22], ax
push 0xffff
push 0
call fcn.00405b30
add esp, 8
mov word [esp + 0x24], ax
lea eax, [esp + 0x26]
mov word [esp + 0x26], 0x3707
mov word [esp + 0x2c], si
mov dword [esp + 0x28], ebp
push 0
push edi
push 8
push eax
push eax
call fcn.00409b80
add esp, 0x14
lea eax, [esp + 0x20]
push 0xe
push eax
push dword [0x443e9c]
call fcn.00409040
add esp, 0xc
add esp, 0x150
pop esi
pop edi
pop ebx
pop ebp
ret
push ebx
call fcn.00409390
add esp, 4
movsd xmm0, qword [0x43a42e]
movsd qword [esp + 0x2f], xmm0
movups xmm0, xmmword [str._connect_store_failed_]
movups xmmword [esp + 0x20], xmm0
mov word [esp + 0x38], 0x9e82
push 0xffff
push 0
call fcn.00405b30
add esp, 8
lea ebx, [esp + 0x3a]
mov word [esp + 0x3a], ax
push 0xffff
push 0
call fcn.00405b30
add esp, 8
mov word [esp + 0x3c], ax
lea eax, [esp + 0x3e]
bswap esi
mov ebp, dword [esp + 8]
bswap ebp
shrd ebp, esi, 0x10
mov word [esp + 0x3e], 0x3407
shr esi, 0x10
mov word [esp + 0x44], si
mov dword [esp + 0x40], ebp
push 0
push ebx
push 8
push eax
push eax
call fcn.00409b80
add esp, 0x14
movzx eax, al
lea edi, [esp + 0x20]
push eax
push ebx
push 0x16
push edi
push edi
call fcn.00409b80
add esp, 0x14
lea eax, [esp + 0x38]
push 0xe
push eax
push dword [0x443e9c]
call fcn.00409040
add esp, 0xc
push 0x16
jmp 0x4030f3
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x20]
lea edi, [ecx + 1]
mov dword [ebp + 0x18], edi
mov edi, ecx
shl edi, 4
mov ebx, dword [esp + 8]
mov dword [edx + edi + 4], ebx
mov dword [edx + edi], esi
mov edx, dword [ebp + 0x20]
mov ebx, dword [esp + 4]
mov dword [edx + edi + 8], ebx
mov edx, dword [ebp + 0x1c]
mov dword [edx + eax*8], ecx
mov dword [edx + eax*8 + 4], esi
mov eax, dword [ebp]
mov ecx, dword [ebp + 4]
inc eax
mov dword [ebp], eax
inc ecx
mov dword [ebp + 4], ecx
cmp ecx, dword [ebp + 8]
jae 0x403397
cmp dword [esp + 0x1b], 0x504455
jne 0x40316d
push ebx
call fcn.00403540
add esp, 4
jmp 0x40316d
cmp edi, 2
jb 0x40302b
mov edx, dword [ebp + 0x20]
mov dword [esp + 0xc], edx
mov edx, edi
shl edx, 4
mov dword [esp], edx
mov edx, dword [esp + 0xc]
mov dword [esp + 0x10], edi
mov edi, dword [esp]
mov edx, dword [edx + edi + 4]
mov edi, dword [esp + 0x10]
mov dword [esp + 4], edx
mov edx, dword [esp + 4]
xor edx, dword [esp + 8]
mov dword [esp + 4], edx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0xc]
mov edx, dword [esp]
mov ecx, dword [ecx + edx]
xor ecx, esi
or ecx, dword [esp + 4]
mov ecx, dword [esp + 0x14]
jne 0x40302b
mov eax, dword [esp + 0xc]
add eax, dword [esp]
jmp 0x40338f
mov dword [esp + 0x14], ecx
mov dword [esp], 0xffffffff
cmp edi, 1
jne 0x40330d
mov dword [esp], eax
mov ecx, 1
jmp 0x403336
xor ecx, 1
mov ebx, dword [esp]
mov edi, ebx
not edi
or edi, ecx
cmove ebx, eax
mov dword [esp], ebx
mov ecx, dword [esp + 0x54]
inc ecx
cmp dword [esp + 0xc], 0
je 0x4033bf
mov dword [esp + 0x54], ecx
add eax, ecx
and eax, dword [esp + 0x14]
mov edx, dword [esp + 0x58]
mov ecx, dword [edx + eax*8]
cmp dword [edx + eax*8 + 4], esi
mov dword [esp + 0xc], ecx
jne 0x403314
cmp ecx, 2
jb 0x403314
mov edx, dword [ebp + 0x20]
mov edi, ecx
shl edi, 4
mov ebx, dword [edx + edi + 4]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x10]
xor ebx, dword [esp + 8]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x50], edx
mov ecx, dword [edx + edi]
xor ecx, esi
or ecx, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
jne 0x403314
mov eax, dword [esp + 0x50]
add eax, edi
mov ebx, dword [esp + 4]
mov dword [eax + 8], ebx
jmp 0x403279
mov ecx, dword [ebp + 0x10]
lea edx, [ecx + 1]
mov esi, edx
shr esi, 1
cmp eax, esi
jbe 0x4033af
cmp ecx, 0x7fffffff
jae 0x4033d4
add edx, edx
mov ecx, ebp
call fcn.00403c40
mov ebx, dword [esp + 4]
jmp 0x403279
cmp dword [esp], 0xffffffff
je 0x403037
dec dword [ebp + 4]
mov eax, dword [esp]
jmp 0x403037
push 2
call dword [0x44101c]
sub esp, 0x14
mov dword [esp], eax
mov dword [esp + 0x14], 0x97
mov dword [esp + 0x10], str.map_u64_ptr_set_at
mov dword [esp + 0xc], str.C:Dropboxwork_starvpn_new_wsclientwsclient.c
mov dword [esp + 8], 0xffffffff
call fcn.00402710
add esp, 0x18
call sub.msvcrt.dll_abort
int3