Function at 0x40fe20
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x45dd9e
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push esi
push edi
mov eax, dword [0x474cb0]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov eax, dword [ebx + 0x78]
push 0x7530
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x410062
cmp dword [ebx + 0x80], 0
je 0x410062
lea esi, [ebx + 0x60]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebx + 0x20], 0
jne 0x40fe96
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebx + 0x78]
push ecx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x41004a
mov eax, dword [ebx + 0x1c]
mov esi, dword [eax]
mov eax, dword [ebx + 8]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x40ffe1
call fcn.004465ac
xor eax, eax
cmp esi, dword [eax + 0x14]
jne 0x40febb
call fcn.004465ac
mov eax, dword [esp + 0x1c]
mov edi, dword [esi + 8]
mov dword [esp + 0x10], edi
test eax, eax
jne 0x40ffe8
call fcn.004465ac
xor eax, eax
cmp esi, dword [eax + 0x14]
jne 0x40fedf
call fcn.004465ac
cmp esi, dword [ebx + 0x1c]
je 0x40feff
mov eax, dword [esi + 4]
mov edx, dword [esi]
mov dword [eax], edx
mov eax, dword [esi]
mov ecx, dword [esi + 4]
push esi
mov dword [eax + 4], ecx
call fcn.004462c0
add esp, 4
dec dword [ebx + 0x20]
mov eax, dword [ebx + 0x38]
mov esi, dword [eax]
mov eax, dword [esi + 4]
lea edx, [esp + 0x10]
push edx
push eax
push esi
call fcn.00411e70
lea ecx, [ebx + 0x24]
mov dword [esp + 0x10], eax
call fcn.00411f20
mov eax, dword [esp + 0x10]
mov dword [esi + 4], eax
mov ecx, dword [eax + 4]
mov dword [ecx], eax
lea eax, [ebx + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x410062
lea esi, [esp + 0x18]
mov eax, edi
call fcn.00414660
lea ecx, [esp + 0x14]
push ecx
mov ecx, eax
mov dword [esp + 0x34], 0
call fcn.00411810
mov byte [esp + 0x30], 1
mov eax, dword [eax]
push str.http:__
push eax
call fcn.004469dd
add esp, 8
lea edx, [esp + 0x14]
test eax, eax
push edx
setne byte [esp + 0x13]
mov byte [esp + 0x34], 0
call fcn.004014e0
lea eax, [esp + 0x18]
or esi, 0xffffffff
push eax
mov dword [esp + 0x34], esi
call fcn.004014e0
cmp byte [esp + 0xf], 0
je 0x40ffef
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push ecx
mov ecx, str._rN_fh
call fcn.00405480
mov dword [esp + 0x34], 2
mov eax, dword [edi]
mov edx, dword [eax + 8]
add eax, 8
mov ecx, edi
mov dword [esp + 0x34], esi
call edx
mov eax, dword [edi + 0x10]
push 0
push eax
push ebx
call fcn.004111e0
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
jmp 0x41004a
mov eax, dword [eax]
jmp 0x40feb1
mov eax, dword [eax]
jmp 0x40fed5
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
push 1
mov ecx, edi
call eax
push 8
call fcn.00446245
mov esi, eax
add esp, 4
mov dword [esi], ebx
mov dword [esi + 4], edi
cmp byte [edi + 0x58], 0
push 0
je 0x410021
push esi
push 0x410940
call dword [sym.imp.KERNEL32.dll_QueueUserWorkItem]
jmp 0x410033
push 0
push esi
push 0x410940
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x410041
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x41004a
push esi
call fcn.004470dc
add esp, 4
mov ecx, dword [ebx + 0x78]
push 0x7530
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x40fe63
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret