Function at 0x1002a970
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 0x1002ad37
cmp dword [0x10121158], 0
mov byte [edi + 0xaa], 1
jne 0x1002a9d2
push 1
call fcn.1006328a
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 0x1002ad10
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
cmp byte [edi + 0xa8], 0
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
jne 0x1002ace1
test ebx, ebx
je 0x1002aa14
cmp word [edi + 0x40], 0
je 0x1002ac5e
push 0x3e8
jmp 0x1002aa16
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.1002a4c0
test al, al
jne 0x1002ab22
lea esi, [edi + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x44]
cmp eax, 0xffffffff
je 0x1002aa56
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 0x1002aaa7
call dword [0x10121130]
cmp eax, 3
jg 0x1002aaa7
push dword [esp + 0x10]
test ebx, ebx
mov ecx, 0x10099378
mov eax, 0x10099370
cmove eax, ecx
push eax
push 0x10099380
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 0x1002aae4
test ecx, ecx
je 0x1002ac49
mov eax, dword [edi + 0x58]
test eax, eax
je 0x1002ac49
cmp byte [edi + 0xa9], 0
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
jne 0x1002ac4f
push dword [esp + 0x10]
push 7
push eax
push ecx
call esi
jmp 0x1002ac4f
test ecx, ecx
je 0x1002ac49
mov edx, dword [edi + 0x58]
test edx, edx
je 0x1002ac49
cmp byte [edi + 0xa9], 0
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
jne 0x1002ac4f
push dword [esp + 0x10]
xor eax, eax
test ebx, ebx
setne al
add eax, 2
push eax
push edx
push ecx
call esi
jmp 0x1002ac4f
mov edx, dword [edi + 0x54]
test edx, edx
je 0x1002ab49
mov ecx, dword [edi + 0x58]
test ecx, ecx
je 0x1002ab49
cmp byte [edi + 0xa9], 0
jne 0x1002ab49
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 0x1002acbe
xor ebx, ebx
call dword [0x10121134]
test al, al
je 0x1002ab87
call dword [0x10121130]
cmp eax, 1
jg 0x1002ab87
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.1002ad50
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 0x1002abb0
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 0x1002abef
mov ecx, dword [edi + 0x54]
test ecx, ecx
je 0x1002ac49
mov eax, dword [edi + 0x58]
test eax, eax
je 0x1002ac49
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
cmp byte [edi + 0xa9], bl
jne 0x1002ac4f
push dword [esp + 0x10]
push 4
push eax
push ecx
call esi
jmp 0x1002ac4f
cmp eax, 3
jne 0x1002ac1c
mov ecx, dword [edi + 0x54]
test ecx, ecx
je 0x1002ac49
mov eax, dword [edi + 0x58]
test eax, eax
je 0x1002ac49
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
cmp byte [edi + 0xa9], bl
jne 0x1002ac4f
push dword [esp + 0x10]
push 5
push eax
push ecx
call esi
jmp 0x1002ac4f
cmp eax, 2
jne 0x1002ac9b
mov ecx, dword [edi + 0x54]
test ecx, ecx
je 0x1002ac49
mov eax, dword [edi + 0x58]
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
test eax, eax
je 0x1002ac4f
cmp byte [edi + 0xa9], bl
jne 0x1002ac4f
push dword [esp + 0x10]
push 6
push eax
push ecx
call esi
jmp 0x1002ac4f
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
inc ebx
cmp ebx, dword [edi + 0x50]
jg 0x1002ad10
jmp 0x1002a9ec
cmp byte [edi + 0x48], 0
jne 0x1002ac70
push dword [edi + 0xa4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
call dword [0x10121134]
test al, al
je 0x1002ad10
call dword [0x10121130]
cmp eax, 1
jg 0x1002ad10
push 0x1009933c
push 1
push 0x281
jmp 0x1002ad02
call dword [0x10121134]
test al, al
je 0x1002ad10
call dword [0x10121130]
cmp eax, 1
jg 0x1002ad10
push str._MASTER_
push 1
push 0x2bc
jmp 0x1002ad02
call dword [0x10121134]
test al, al
je 0x1002ad10
call dword [0x10121130]
cmp eax, 1
jg 0x1002ad10
push 0x100993bc
push 1
push 0x2a3
jmp 0x1002ad02
call dword [0x10121134]
test al, al
je 0x1002ad10
call dword [0x10121130]
cmp eax, 1
jg 0x1002ad10
push 0x10099308
push 1
push 0x276
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x10
mov ecx, edi
call fcn.10029070
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.10063277
mov esp, ebp
pop ebp
ret