Function at 0x10012f66
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x60
push 0
push 0x13
push 0x100186c0
call fcn.100129b9
add esp, 0xc
push 5
pop eax
push 2
pop ecx
mov dword [0x100193e8], eax
mov eax, dword [0x100193e8]
cmp eax, 0x186a0
jg 0x10012fdd
mov eax, ecx
mov dword [0x100193e4], eax
mov esi, dword [0x100193e4]
mov eax, dword [0x100193e8]
cdq
idiv ecx
cmp esi, eax
jg 0x10012fd5
mov eax, dword [0x100193e8]
cdq
idiv dword [0x100193e4]
test edx, edx
je 0x10012fcb
mov eax, dword [0x100193e4]
inc eax
jmp 0x10012f9c
mov dword [0x100193b4], 1
mov eax, dword [0x100193e8]
inc eax
jmp 0x10012f89
push 0
push 0x10
push 0x100186d3
call fcn.100129b9
add esp, 0xc
push 0x14
pop ecx
call 0x100135a4
mov dword [0x100193ac], eax
push 0
push 0x18
push 0x100186f0
call fcn.100129b9
add esp, 0xc
push 0x30d40
call dword [sym.imp.KERNEL32.dll_Sleep]
movsd xmm0, qword [0x10014a80]
and dword [esp + 0x34], 0
xor esi, esi
mov dword [esp + 0x30], 1
movsd qword [esp + 0x50], xmm0
cmp esi, 0xfde8
je 0x10013584
inc esi
push 0
push 0xa
push 0x10018708
call fcn.100129b9
add esp, 0xc
push 0
push 0x1a
push str.__0D
call fcn.100129b9
add esp, 0xc
xor edi, edi
mov dword [esp + 0x1c], esi
cmp edi, 6
je 0x10013034
push 0
push 0x22
push 0x10018740
call fcn.100129b9
add esp, 0xc
xor eax, eax
mov dword [esp + 0x14], edi
cmp eax, 2
je 0x10013565
push 0
push 0x1b
push 0x10018770
mov dword [esp + 0x10], eax
call fcn.100129b9
mov eax, dword [esp + 0x10]
add esp, 0xc
xor ebx, ebx
cmp ebx, 2
je 0x1001355f
push 0
push 0x16
push 0x10018790
call fcn.100129b9
mov eax, dword [esp + 0x10]
add esp, 0xc
xor ecx, ecx
mov dword [esp + 0x18], ebx
cmp ecx, 4
je 0x10013559
push 0
push 0x16
push 0x100187b0
mov dword [esp + 0x14], ecx
call fcn.100129b9
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
add esp, 0xc
mov edx, dword [edi*4 + 0x10014a98]
mov dword [esp + 0x2c], edx
mov edx, dword [ecx*4 + 0x10014a88]
mov dword [esp + 0x28], edx
mov edx, dword [esp + ebx*4 + 0x50]
mov dword [esp + 0x24], edx
mov edx, dword [esp + eax*4 + 0x30]
mov dword [esp + 0x20], edx
xor edx, edx
cmp edx, 1
je 0x10013553
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xc], edx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], 0x100185d0
push 0
push 0x51
push str.__r_r_n
call fcn.100129b9
add esp, 0xc
push 0
push 0
lea eax, [esp + 0x44]
push eax
push 0x100135ca
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x1001358c
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
push 0x17
push 0x10018830
call fcn.100129b9
add esp, 0xc
push 0
push 0xe
push 0x1001886a
call fcn.100129b9
add esp, 0xc
mov esi, dword [0x100193b0]
and dword [0x100193a4], 0
and dword [0x100193b0], 0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0xc]
test esi, esi
je 0x100133b1
mov edi, dword [esi]
cmp dword [edi + 0xc], 0
jne 0x100131f2
mov ecx, edi
call fcn.10008b3f
mov edi, dword [esi]
cmp dword [edi + 0xc], 0
jne 0x100131f2
mov ecx, edi
call fcn.10008b3f
mov ebx, dword [edi + 0x10]
test ebx, ebx
je 0x10013211
push 0
push 0x15
push 0x10016430
call fcn.100129b9
add esp, 0xc
push ebx
call sub.msvcrt.dll_free
pop eax
mov ebx, dword [edi + 0x30]
test ebx, ebx
je 0x10013357
mov eax, dword [ebx]
cmp eax, 2
jge 0x10013252
cmp eax, 1
je 0x100132a7
test eax, eax
jne 0x1001356b
mov eax, dword [ebx + 4]
cmp dword [eax + 8], 0
jne 0x10013240
mov dword [eax + 8], 1
push 0
push 0x19
push 0x100170e0
mov dword [esp + 0xc], eax
jmp 0x1001332e
je 0x100132db
cmp eax, 3
jne 0x1001356b
mov eax, dword [ebx + 4]
cmp dword [eax + 4], 0
jne 0x10013271
mov dword [eax + 4], 1
mov dword [esp], eax
mov eax, dword [eax]
test eax, eax
je 0x10013299
push 0
push 0x16
push 0x10017240
mov dword [esp + 0x1c], eax
call fcn.100129b9
add esp, 0xc
push dword [esp + 0x10]
call sub.msvcrt.dll_free
pop eax
push 0
push 0x16
push 0x10017240
jmp 0x1001332e
mov eax, dword [ebx + 4]
mov dword [esp], eax
push 0
push 0x15
push 0x100171f0
call fcn.100129b9
add esp, 0xc
mov ecx, dword [esp]
xor eax, eax
cmp dword [ecx + 0xc], eax
jne 0x100132d0
mov ecx, dword [esp]
call fcn.1000a78d
push 0
push 0x16
push 0x10017120
jmp 0x1001332e
mov eax, dword [ebx + 4]
cmp dword [eax + 0x14], 0
jne 0x100132eb
mov dword [eax + 0x14], 1
mov ecx, dword [eax]
mov dword [esp], eax
test ecx, ecx
je 0x10013319
push 0
push 0x21
push 0x10016cc0
mov dword [esp + 0x1c], ecx
call fcn.100129b9
add esp, 0xc
push dword [esp + 0x10]
call sub.msvcrt.dll_free
mov eax, dword [esp + 4]
add esp, 4
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x10013325
call fcn.1000aa5c
push 0
push 0x21
push 0x10016cc0
call fcn.100129b9
add esp, 0xc
push dword [esp]
call sub.msvcrt.dll_free
pop eax
push 0
push 0x11
push 0x10016a60
call fcn.100129b9
add esp, 0xc
push ebx
call sub.msvcrt.dll_free
pop eax
mov ecx, dword [edi + 0x34]
test ecx, ecx
je 0x10013363
call fcn.1000aa5c
mov ecx, dword [edi + 0x38]
mov ebx, dword [esp + 0x18]
test ecx, ecx
je 0x10013373
call fcn.1000d1ee
push 0
push 0x15
push 0x10016430
call fcn.100129b9
add esp, 0xc
push edi
call sub.msvcrt.dll_free
pop eax
mov edi, dword [esi + 4]
push 0
push 0x18
push 0x10016960
call fcn.100129b9
add esp, 0xc
push esi
call sub.msvcrt.dll_free
pop eax
mov esi, edi
mov edi, dword [esp + 0x14]
jmp 0x100131c0
mov esi, dword [0x10019404]
test esi, esi
je 0x100133ed
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x100133c9
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push 0
push 0x1c
push 0x100180a0
call fcn.100129b9
add esp, 0xc
push esi
call sub.msvcrt.dll_free
pop eax
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0xc]
mov esi, dword [0x100193e0]
test esi, esi
je 0x10013519
xor edi, edi
mov eax, dword [esi]
cmp edi, dword [esi + 4]
jae 0x100134a1
mov edx, dword [eax + edi*4]
mov ecx, dword [edx + 0x24]
test ecx, ecx
je 0x10013442
push dword [edx + 0x20]
push 0
push ecx
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, dword [esi]
mov eax, dword [eax + edi*4]
mov ebx, dword [eax + 0x24]
push 0
push 0x14
push 0x10017b30
call fcn.100129b9
add esp, 0xc
push ebx
call sub.msvcrt.dll_free
pop eax
mov eax, dword [esi]
mov eax, dword [eax + edi*4]
and dword [eax + 4], 0
and dword [eax], 0
and dword [eax + 0xc], 0
and dword [eax + 8], 0
and dword [eax + 0x14], 0
and dword [eax + 0x10], 0
and dword [eax + 0x1c], 0
and dword [eax + 0x18], 0
and dword [eax + 0x24], 0
and dword [eax + 0x20], 0
and dword [eax + 0x2c], 0
and dword [eax + 0x28], 0
and dword [eax + 0x34], 0
and dword [eax + 0x30], 0
mov eax, dword [esi]
mov ebx, dword [eax + edi*4]
push 0
push 0x14
pop eax
push eax
push 0x10017b30
call fcn.100129b9
add esp, 0xc
push ebx
call sub.msvcrt.dll_free
pop eax
inc edi
jmp 0x100133fd
mov ecx, dword [esi + 8]
shl ecx, 2
push ecx
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov edi, dword [esi]
push 0
push 0x14
pop eax
mov ebx, eax
push eax
mov eax, 0x10017b30
push eax
call fcn.100129b9
add esp, 0xc
push edi
call sub.msvcrt.dll_free
pop eax
and dword [esi + 4], 0
and dword [esi], 0
and dword [esi + 0xc], 0
and dword [esi + 8], 0
and dword [esi + 0x14], 0
and dword [esi + 0x10], 0
and dword [esi + 0x18], 0
push 0
push ebx
mov ebx, dword [esp + 0x20]
mov eax, 0x10017b30
push eax
call fcn.100129b9
add esp, 0xc
push esi
call sub.msvcrt.dll_free
pop eax
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0xc]
mov esi, dword [0x10019400]
test esi, esi
je 0x10013549
push 0
push 9
push 0x10018878
call fcn.100129b9
add esp, 0xc
push esi
call sub.msvcrt.dll_free
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 8]
add esp, 4
mov esi, dword [esp + 0x1c]
inc edx
jmp 0x1001311b
inc ecx
jmp 0x100130cd
inc ebx
jmp 0x100130a9
inc eax
jmp 0x10013085
inc edi
jmp 0x10013069
push 0
push 0x2d
push 0x10016ab0
call fcn.100129b9
add esp, 0xc
push 1
call dword [sym.imp.KERNEL32.dll_ExitThread]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 0
push 0x1a
push 0x10018850
call fcn.100129b9
add esp, 0xc
push 1
call sub.msvcrt.dll_exit
push edi
push esi
mov esi, ecx
cmp ecx, 2
jge 0x100135b1
mov eax, esi
jmp 0x100135c7
lea ecx, [esi - 1]
call 0x100135a4
add esi, 0xfffffffe
mov edi, eax
mov ecx, esi
call 0x100135a4
add eax, edi
pop esi
pop edi
ret