Function at 0x1002a9b0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1a4
mov eax, dword [0x100ab080]
xor eax, esp
mov dword [esp + 0x1a0], eax
push ebx
push esi
push edi
mov edi, ecx
cmp byte [edi + 0xae], 0
jne 0x1002ad65
cmp dword [0x101250d8], 0
mov byte [edi + 0xae], 1
jne 0x1002aa12
push 1
call fcn.1006637f
add esp, 4
mov esi, eax
lea eax, [esp + 0x18]
mov dword [esp + 0x14], esi
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [0x101250d8], esi
xor ebx, ebx
mov word [edi + 0xac], 0
cmp dword [edi + 0x54], ebx
jl 0x1002ad3e
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
cmp byte [edi + 0xac], 0
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
jne 0x1002ad0f
test ebx, ebx
je 0x1002aa54
cmp word [edi + 0x40], 0
je 0x1002ac9e
push 0x3e8
jmp 0x1002aa56
push 0x64
call eax
test ebx, ebx
mov dword [esp + 0x10], 0
mov ecx, edi
setne al
movzx eax, al
push eax
lea eax, [esp + 0x14]
push eax
call fcn.1002a500
test al, al
jne 0x1002ab62
lea esi, [edi + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x44]
cmp eax, 0xffffffff
je 0x1002aa96
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push esi
mov dword [edi + 0x44], 0xffffffff
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call dword [0x101250b4]
test al, al
je 0x1002aae7
call dword [0x101250b0]
cmp eax, 3
jg 0x1002aae7
push dword [esp + 0x10]
test ebx, ebx
mov ecx, 0x1009c3a0
mov eax, 0x1009c398
cmove eax, ecx
push eax
push 0x1009c3a8
push 3
push 0x287
push str.acc_socks5agent.cpp
call dword [0x101250b8]
add esp, 0x18
mov ecx, dword [edi + 0x58]
cmp ebx, dword [edi + 0x54]
jl 0x1002ab24
test ecx, ecx
je 0x1002ac89
mov eax, dword [edi + 0x5c]
test eax, eax
je 0x1002ac89
cmp byte [edi + 0xad], 0
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
jne 0x1002ac8f
push dword [esp + 0x10]
push 7
push eax
push ecx
call esi
jmp 0x1002ac8f
test ecx, ecx
je 0x1002ac89
mov edx, dword [edi + 0x5c]
test edx, edx
je 0x1002ac89
cmp byte [edi + 0xad], 0
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
jne 0x1002ac8f
push dword [esp + 0x10]
xor eax, eax
test ebx, ebx
setne al
add eax, 2
push eax
push edx
push ecx
call esi
jmp 0x1002ac8f
mov edx, dword [edi + 0x58]
test edx, edx
je 0x1002ab89
mov ecx, dword [edi + 0x5c]
test ecx, ecx
je 0x1002ab89
cmp byte [edi + 0xad], 0
jne 0x1002ab89
push dword [esp + 0x10]
xor eax, eax
test ebx, ebx
setne al
push eax
push ecx
push edx
call esi
cmp byte [edi + 0xac], 0
jne 0x1002acec
xor ebx, ebx
call dword [0x101250b4]
test al, al
je 0x1002abc7
call dword [0x101250b0]
cmp eax, 1
jg 0x1002abc7
push str._MASTER_master
push 1
push 0x2a0
push str.acc_socks5agent.cpp
call dword [0x101250b8]
add esp, 0x10
lea eax, [esp + 0x10]
mov ecx, edi
push eax
call fcn.1002ad80
lea esi, [edi + 0x28]
mov dword [esp + 0x14], eax
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x44]
cmp eax, 0xffffffff
je 0x1002abf0
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push esi
mov dword [edi + 0x44], 0xffffffff
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x14]
cmp eax, 1
jne 0x1002ac2f
mov ecx, dword [edi + 0x58]
test ecx, ecx
je 0x1002ac89
mov eax, dword [edi + 0x5c]
test eax, eax
je 0x1002ac89
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
cmp byte [edi + 0xad], bl
jne 0x1002ac8f
push dword [esp + 0x10]
push 4
push eax
push ecx
call esi
jmp 0x1002ac8f
cmp eax, 3
jne 0x1002ac5c
mov ecx, dword [edi + 0x58]
test ecx, ecx
je 0x1002ac89
mov eax, dword [edi + 0x5c]
test eax, eax
je 0x1002ac89
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
cmp byte [edi + 0xad], bl
jne 0x1002ac8f
push dword [esp + 0x10]
push 5
push eax
push ecx
call esi
jmp 0x1002ac8f
cmp eax, 2
jne 0x1002acc9
mov ecx, dword [edi + 0x58]
test ecx, ecx
je 0x1002ac89
mov eax, dword [edi + 0x5c]
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
test eax, eax
je 0x1002ac8f
cmp byte [edi + 0xad], bl
jne 0x1002ac8f
push dword [esp + 0x10]
push 6
push eax
push ecx
call esi
jmp 0x1002ac8f
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
inc ebx
cmp ebx, dword [edi + 0x54]
jg 0x1002ad3e
jmp 0x1002aa2c
call dword [0x101250b4]
test al, al
je 0x1002ad3e
call dword [0x101250b0]
cmp eax, 1
jg 0x1002ad3e
push 0x1009c364
push 1
push 0x278
jmp 0x1002ad30
call dword [0x101250b4]
test al, al
je 0x1002ad3e
call dword [0x101250b0]
cmp eax, 1
jg 0x1002ad3e
push str._MASTER_
push 1
push 0x2b3
jmp 0x1002ad30
call dword [0x101250b4]
test al, al
je 0x1002ad3e
call dword [0x101250b0]
cmp eax, 1
jg 0x1002ad3e
push 0x1009c3e4
push 1
push 0x29a
jmp 0x1002ad30
call dword [0x101250b4]
test al, al
je 0x1002ad3e
call dword [0x101250b0]
cmp eax, 1
jg 0x1002ad3e
push 0x1009c330
push 1
push 0x272
push str.acc_socks5agent.cpp
call dword [0x101250b8]
add esp, 0x10
mov ecx, edi
call fcn.10029440
push dword [edi + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x1c], 0
mov word [edi + 0xac], 0
mov byte [edi + 0xae], 0
mov ecx, dword [esp + 0x1ac]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1006636c
mov esp, ebp
pop ebp
ret