Function at 0x1002a910
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1a4
mov eax, dword [0x100a70c0]
xor eax, esp
mov dword [esp + 0x1a0], eax
push ebx
push esi
push edi
mov edi, ecx
cmp byte [edi + 0xaa], 0
jne 0x1002acd7
cmp dword [0x10121158], 0
mov byte [edi + 0xaa], 1
jne 0x1002a972
push 1
call fcn.1006332a
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 [0x10121158], esi
xor ebx, ebx
mov word [edi + 0xa8], 0
cmp dword [edi + 0x50], ebx
jl 0x1002acb0
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
cmp byte [edi + 0xa8], 0
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
jne 0x1002ac81
test ebx, ebx
je 0x1002a9b4
cmp word [edi + 0x40], 0
je 0x1002abfe
push 0x3e8
jmp 0x1002a9b6
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.1002a460
test al, al
jne 0x1002aac2
lea esi, [edi + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x44]
cmp eax, 0xffffffff
je 0x1002a9f6
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 [0x10121134]
test al, al
je 0x1002aa47
call dword [0x10121130]
cmp eax, 3
jg 0x1002aa47
push dword [esp + 0x10]
test ebx, ebx
mov ecx, 0x100993f8
mov eax, 0x100993f0
cmove eax, ecx
push eax
push 0x10099400
push 3
push 0x290
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x18
mov ecx, dword [edi + 0x54]
cmp ebx, dword [edi + 0x50]
jl 0x1002aa84
test ecx, ecx
je 0x1002abe9
mov eax, dword [edi + 0x58]
test eax, eax
je 0x1002abe9
cmp byte [edi + 0xa9], 0
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
jne 0x1002abef
push dword [esp + 0x10]
push 7
push eax
push ecx
call esi
jmp 0x1002abef
test ecx, ecx
je 0x1002abe9
mov edx, dword [edi + 0x58]
test edx, edx
je 0x1002abe9
cmp byte [edi + 0xa9], 0
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
jne 0x1002abef
push dword [esp + 0x10]
xor eax, eax
test ebx, ebx
setne al
add eax, 2
push eax
push edx
push ecx
call esi
jmp 0x1002abef
mov edx, dword [edi + 0x54]
test edx, edx
je 0x1002aae9
mov ecx, dword [edi + 0x58]
test ecx, ecx
je 0x1002aae9
cmp byte [edi + 0xa9], 0
jne 0x1002aae9
push dword [esp + 0x10]
xor eax, eax
test ebx, ebx
setne al
push eax
push ecx
push edx
call esi
cmp byte [edi + 0xa8], 0
jne 0x1002ac5e
xor ebx, ebx
call dword [0x10121134]
test al, al
je 0x1002ab27
call dword [0x10121130]
cmp eax, 1
jg 0x1002ab27
push str._MASTER_master
push 1
push 0x2a9
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x10
lea eax, [esp + 0x10]
mov ecx, edi
push eax
call fcn.1002acf0
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 0x1002ab50
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 0x1002ab8f
mov ecx, dword [edi + 0x54]
test ecx, ecx
je 0x1002abe9
mov eax, dword [edi + 0x58]
test eax, eax
je 0x1002abe9
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
cmp byte [edi + 0xa9], bl
jne 0x1002abef
push dword [esp + 0x10]
push 4
push eax
push ecx
call esi
jmp 0x1002abef
cmp eax, 3
jne 0x1002abbc
mov ecx, dword [edi + 0x54]
test ecx, ecx
je 0x1002abe9
mov eax, dword [edi + 0x58]
test eax, eax
je 0x1002abe9
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
cmp byte [edi + 0xa9], bl
jne 0x1002abef
push dword [esp + 0x10]
push 5
push eax
push ecx
call esi
jmp 0x1002abef
cmp eax, 2
jne 0x1002ac3b
mov ecx, dword [edi + 0x54]
test ecx, ecx
je 0x1002abe9
mov eax, dword [edi + 0x58]
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
test eax, eax
je 0x1002abef
cmp byte [edi + 0xa9], bl
jne 0x1002abef
push dword [esp + 0x10]
push 6
push eax
push ecx
call esi
jmp 0x1002abef
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
inc ebx
cmp ebx, dword [edi + 0x50]
jg 0x1002acb0
jmp 0x1002a98c
cmp byte [edi + 0x48], 0
jne 0x1002ac10
push dword [edi + 0xa4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
call dword [0x10121134]
test al, al
je 0x1002acb0
call dword [0x10121130]
cmp eax, 1
jg 0x1002acb0
push 0x100993bc
push 1
push 0x281
jmp 0x1002aca2
call dword [0x10121134]
test al, al
je 0x1002acb0
call dword [0x10121130]
cmp eax, 1
jg 0x1002acb0
push str._MASTER_
push 1
push 0x2bc
jmp 0x1002aca2
call dword [0x10121134]
test al, al
je 0x1002acb0
call dword [0x10121130]
cmp eax, 1
jg 0x1002acb0
push 0x1009943c
push 1
push 0x2a3
jmp 0x1002aca2
call dword [0x10121134]
test al, al
je 0x1002acb0
call dword [0x10121130]
cmp eax, 1
jg 0x1002acb0
push 0x10099388
push 1
push 0x276
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x10
mov ecx, edi
call fcn.10029010
push dword [edi + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x1c], 0
mov word [edi + 0xa8], 0
mov byte [edi + 0xaa], 0
mov ecx, dword [esp + 0x1ac]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10063317
mov esp, ebp
pop ebp
ret