Function at 0x4177f0
Capabilities:
Access peb ldr_data
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45bc78
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x47a480]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x30]
lea ebx, [esi + 0x30]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
mov edi, 0x7e
sub eax, edi
or eax, ecx
jge 0x41783f
push edi
mov ecx, ebx
call fcn.004031a0
mov eax, dword [ebx]
lea ecx, [esi + 0x34]
push ecx
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.00401a50
mov eax, dword [ebx]
add esp, 0xc
cmp dword [eax - 8], edi
jl 0x417b1a
mov edx, dword [ebp + 0x10]
mov dword [eax - 0xc], edi
mov ecx, dword [ebx]
mov eax, dword [ebp + 0x14]
mov byte [ecx + 0x7e], 0
mov ecx, dword [ebp + 0x18]
mov dword [esi + 0x18], edx
mov edx, dword [ebp + 0x1c]
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], ecx
mov dword [esi + 0x24], edx
call fcn.0041d226
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x417898
push 0x80004005
call fcn.00402fa0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0
call fcn.0041d226
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4178c8
push 0x80004005
call fcn.00402fa0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp + 0x14], eax
mov ecx, dword [ebp + 0xc]
mov byte [ebp - 4], 1
lea edi, [esi + 0x10]
test ecx, ecx
jne 0x4178e9
xor eax, eax
jmp 0x4178fb
mov eax, ecx
lea edx, [eax + 1]
mov dword [ebp + 0xc], edx
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4178f1
sub eax, dword [ebp + 0xc]
push eax
push ecx
mov ecx, edi
call fcn.004032e0
mov eax, dword [edi]
push 0x5c
push eax
call fcn.00444f3b
add esp, 8
test eax, eax
jne 0x41791a
or eax, 0xffffffff
jmp 0x41791c
sub eax, dword [edi]
inc eax
push eax
push 0
lea eax, [ebp + 0xc]
push eax
mov ecx, edi
call fcn.0040bba0
push eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.004033d0
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41795b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp + 8]
push edi
call fcn.004017e0
add esp, 4
test al, al
je 0x4179c7
mov eax, dword [ebp + 0x14]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41798e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4179b1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [esi + 0x34]
mov eax, dword [ebx]
push ecx
push ecx
sub eax, 0x10
mov dword [ebp + 0x1c], esp
mov edi, esp
push eax
call fcn.004031f0
add eax, 0x10
add esp, 4
mov ecx, esi
mov dword [edi], eax
call fcn.00417270
test al, al
jne 0x417a1c
mov byte [ebp - 4], al
mov eax, dword [ebp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x417a11
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
jmp 0x417991
mov ecx, esi
call fcn.00417140
test al, al
jne 0x417a71
mov ecx, dword [esi + 0x2c]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp + 0x14]
or edi, 0xffffffff
add eax, 0xfffffff0
mov dword [esi + 0x2c], edi
mov byte [ebp - 4], 0
lea edx, [eax + 0xc]
mov ecx, edi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x417a59
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov dword [ebp - 4], edi
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jmp 0x4179a5
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esi + 0xc], eax
test eax, eax
jne 0x417ab3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
add esi, 0x38
push str.CreateEvent__
push esi
call fcn.00403c40
add esp, 0xc
lea ecx, [ebp + 0x14]
call fcn.00403290
lea ecx, [ebp + 8]
call fcn.00403290
jmp 0x4179b1
lea ecx, [ebp - 0x10]
push ecx
push 0
push esi
push 0x4177d0
push 0
push 0
call fcn.00446741
add esp, 0x18
mov dword [esi + 8], eax
test eax, eax
ja 0x417af0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esi + 0x38]
push str._beginthreadex__
push edx
call fcn.00403c40
mov dword [esi + 8], 0
jmp 0x417a9b
lea ecx, [ebp + 0x14]
mov byte [esi + 0x28], 1
call fcn.00403290
lea ecx, [ebp + 8]
call fcn.00403290
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
push 0x80070057
call fcn.00402fa0
int3