Function at 0x403310
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47b1e0
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x4ade78]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x18], 0
call fcn.0040cfe0
test al, al
jne 0x403388
mov esi, dword [0x4af2c0]
mov eax, 0x51eb851f
imul esi
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul ecx, ecx, 0x64
sub esi, ecx
xor ecx, ecx
lea eax, [esi + 0x7b]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004601e0
push eax
call fcn.0046208f
add esp, 8
mov ebx, dword [ebp + 0xc]
push ebx
call fcn.00416310
add esp, 4
test al, al
je 0x4034ba
push dword [edi + 0x18]
lea eax, [edi + 0x98]
push dword [edi + 0x90]
push ebx
push eax
push dword [edi + 0x94]
lea eax, [ebp - 0x28]
push eax
call fcn.004139d0
add esp, 0x18
mov eax, dword [0x4adbb8]
mov ecx, 0x4adbb8
mov dword [ebp - 4], 0
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 0xc], eax
mov byte [ebp - 4], 1
call fcn.0040cfe0
test al, al
jne 0x403411
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
xor edx, edx
mov ecx, 0x9bf59eb2
div ecx
mov esi, edx
lea esp, [esp]
call edi
mov ecx, eax
mov eax, esi
xor edx, edx
div ecx
lea esi, [edx - 1]
test esi, esi
jg 0x403400
push ebx
call fcn.004162d0
add esp, 4
or edi, 0xffffffff
test al, al
je 0x403466
sub esp, 0x18
lea ecx, [ebp - 0x28]
push esp
call fcn.0042f610
lea eax, [ebp - 0x10]
push eax
call fcn.00452d60
add esp, 0x1c
push eax
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 2
call fcn.00402970
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
mov byte [ebp - 4], 1
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x403466
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp + 0xc]
add esi, 0xfffffff0
push esi
call fcn.00403ee0
mov ebx, dword [ebp + 8]
add eax, 0x10
mov dword [ebx], eax
add esp, 4
mov byte [ebp - 4], 0
lea eax, [esi + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x403495
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
call fcn.0042dd80
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 0x14]
push eax
push 0
push ebx
mov ecx, edi
mov dword [ebp - 0x14], 0
call fcn.00404040
push eax
push 0x4053f0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [0x4af2c0]
mov ebx, eax
lea eax, [ecx + 1]
imul eax, ecx
cdq
mov ecx, 0xc
idiv ecx
cmp edx, 5
jne 0x40352e
push 0x28
call fcn.004601e0
add esp, 4
mov edi, eax
xor esi, esi
call fcn.00461e71
add eax, dword [0x4af2c0]
inc esi
mov dword [edi + esi*4 - 4], eax
cmp esi, 0xa
jl 0x403508
mov eax, dword [edi + 0x24]
push edi
mov dword [0x4af2c0], eax
call fcn.0046208f
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4adbb8]
mov ecx, 0x4adbb8
call dword [eax + 0xc]
mov esi, dword [ebp + 8]
add eax, 0x10
mov dword [esi], eax
mov eax, 0x490f70
mov dword [ebp - 4], 3
push 0
test eax, 0xffff0000
jne 0x40357a
movzx edi, ax
push edi
call fcn.00403750
add esp, 8
test eax, eax
je 0x403586
push edi
push eax
mov ecx, esi
call fcn.00405c50
jmp 0x403586
push 0x490f70
mov ecx, esi
call fcn.00408620
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8