Function at 0x1002a930
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 0x1002acf7
cmp dword [0x10121158], 0
mov byte [edi + 0xaa], 1
jne 0x1002a992
push 1
call fcn.1006334a
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 0x1002acd0
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
cmp byte [edi + 0xa8], 0
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
jne 0x1002aca1
test ebx, ebx
je 0x1002a9d4
cmp word [edi + 0x40], 0
je 0x1002ac1e
push 0x3e8
jmp 0x1002a9d6
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.1002a480
test al, al
jne 0x1002aae2
lea esi, [edi + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x44]
cmp eax, 0xffffffff
je 0x1002aa16
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 0x1002aa67
call dword [0x10121130]
cmp eax, 3
jg 0x1002aa67
push dword [esp + 0x10]
test ebx, ebx
mov ecx, 0x100993f0
mov eax, 0x100993e8
cmove eax, ecx
push eax
push 0x100993f8
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 0x1002aaa4
test ecx, ecx
je 0x1002ac09
mov eax, dword [edi + 0x58]
test eax, eax
je 0x1002ac09
cmp byte [edi + 0xa9], 0
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
jne 0x1002ac0f
push dword [esp + 0x10]
push 7
push eax
push ecx
call esi
jmp 0x1002ac0f
test ecx, ecx
je 0x1002ac09
mov edx, dword [edi + 0x58]
test edx, edx
je 0x1002ac09
cmp byte [edi + 0xa9], 0
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
jne 0x1002ac0f
push dword [esp + 0x10]
xor eax, eax
test ebx, ebx
setne al
add eax, 2
push eax
push edx
push ecx
call esi
jmp 0x1002ac0f
mov edx, dword [edi + 0x54]
test edx, edx
je 0x1002ab09
mov ecx, dword [edi + 0x58]
test ecx, ecx
je 0x1002ab09
cmp byte [edi + 0xa9], 0
jne 0x1002ab09
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 0x1002ac7e
xor ebx, ebx
call dword [0x10121134]
test al, al
je 0x1002ab47
call dword [0x10121130]
cmp eax, 1
jg 0x1002ab47
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.1002ad10
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 0x1002ab70
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 0x1002abaf
mov ecx, dword [edi + 0x54]
test ecx, ecx
je 0x1002ac09
mov eax, dword [edi + 0x58]
test eax, eax
je 0x1002ac09
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
cmp byte [edi + 0xa9], bl
jne 0x1002ac0f
push dword [esp + 0x10]
push 4
push eax
push ecx
call esi
jmp 0x1002ac0f
cmp eax, 3
jne 0x1002abdc
mov ecx, dword [edi + 0x54]
test ecx, ecx
je 0x1002ac09
mov eax, dword [edi + 0x58]
test eax, eax
je 0x1002ac09
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
cmp byte [edi + 0xa9], bl
jne 0x1002ac0f
push dword [esp + 0x10]
push 5
push eax
push ecx
call esi
jmp 0x1002ac0f
cmp eax, 2
jne 0x1002ac5b
mov ecx, dword [edi + 0x54]
test ecx, ecx
je 0x1002ac09
mov eax, dword [edi + 0x58]
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
test eax, eax
je 0x1002ac0f
cmp byte [edi + 0xa9], bl
jne 0x1002ac0f
push dword [esp + 0x10]
push 6
push eax
push ecx
call esi
jmp 0x1002ac0f
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
inc ebx
cmp ebx, dword [edi + 0x50]
jg 0x1002acd0
jmp 0x1002a9ac
cmp byte [edi + 0x48], 0
jne 0x1002ac30
push dword [edi + 0xa4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
call dword [0x10121134]
test al, al
je 0x1002acd0
call dword [0x10121130]
cmp eax, 1
jg 0x1002acd0
push 0x100993b4
push 1
push 0x281
jmp 0x1002acc2
call dword [0x10121134]
test al, al
je 0x1002acd0
call dword [0x10121130]
cmp eax, 1
jg 0x1002acd0
push str._MASTER_
push 1
push 0x2bc
jmp 0x1002acc2
call dword [0x10121134]
test al, al
je 0x1002acd0
call dword [0x10121130]
cmp eax, 1
jg 0x1002acd0
push 0x10099434
push 1
push 0x2a3
jmp 0x1002acc2
call dword [0x10121134]
test al, al
je 0x1002acd0
call dword [0x10121130]
cmp eax, 1
jg 0x1002acd0
push 0x10099380
push 1
push 0x276
push str.acc_socks5agent.cpp
call dword [0x10121138]
add esp, 0x10
mov ecx, edi
call fcn.10029030
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.10063337
mov esp, ebp
pop ebp
ret