Function at 0x409270
Capabilities:
Create thread
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x2080
call fcn.0040afc0
mov ax, word [0x41a760]
push ebx
push ebp
push esi
push edi
mov word [esp + 0x8c], ax
mov ecx, 0x800
xor eax, eax
lea edi, [esp + 0x8e]
xor ebx, ebx
rep stosd dword es:[edi], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
stosw word es:[edi], ax
mov dword [esp + 0x20], ebx
call fcn.00408f70
test eax, eax
je 0x4093f4
lea ecx, [esp + 0x5c]
lea edx, [esp + 0x14]
push ecx
lea eax, [esp + 0x30]
push edx
lea ecx, [esp + 0x24]
push eax
push ecx
push ebx
push 0x65
push 0x65
call fcn.00404020
mov edi, eax
add esp, 0x1c
cmp edi, ebx
je 0x4093f4
mov edx, dword [0x41a730]
mov ebp, dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
add edx, 0x90
push ebx
push edx
call ebp
test eax, eax
je 0x409379
push ebx
push ebx
call fcn.0040a3b0
add esp, 8
push ebx
call fcn.00408ea0
mov eax, dword [edi + 0x3c]
mov ecx, dword [edi + 0x38]
mov edx, dword [esp + 0x18]
push ebx
push 0x65
push 0x65
push eax
push ecx
push edx
call fcn.00404800
mov esi, eax
push ebx
push esi
push edi
call fcn.004090a0
add esp, 0x28
cmp esi, ebx
je 0x4093b6
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
push ebx
push ebx
push 0x409080
push ebx
push ebx
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0x3a98
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x41a730]
push ebx
add eax, 0x90
push eax
call ebp
test eax, eax
je 0x4093fa
push ebx
push 1
call fcn.0040a3b0
add esp, 8
jmp 0x4093fa
mov ebp, dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov ecx, dword [0x41a730]
push ebx
add ecx, 0x44
push ecx
call ebp
test eax, eax
je 0x409514
mov dword [esp + 0x10], 2
mov dword [esp + 0x209c], 1
mov eax, dword [esp + 0x209c]
mov dword [esp + 0x28], ebx
cmp eax, ebx
jle 0x409632
lea eax, [esp + 0x5c]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x24]
push edx
mov edx, dword [esp + 0x20a4]
push eax
mov eax, dword [esp + 0x20a4]
push ecx
push edx
push eax
call fcn.00404020
mov esi, eax
add esp, 0x1c
cmp esi, ebx
je 0x4095fe
mov eax, dword [esp + 0x20a4]
cmp eax, ebx
je 0x409481
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
mov edi, dword [esi + 0x20]
lea ebp, [edi + 0x20]
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esi + 0x14]
push edx
push 0x41a748
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov eax, dword [esi + 8]
cmp eax, ebx
jne 0x4094a9
mov eax, str.NULL
push eax
push 0x416a5c
push 0x41a32c
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20a4]
mov edx, dword [esp + 0x20a0]
push eax
mov eax, dword [esi + 0x3c]
push ecx
mov ecx, dword [esi + 0x38]
push edx
mov edx, dword [esp + 0x2c]
push eax
push ecx
push edx
call fcn.00404800
add esp, 0x24
cmp eax, ebx
mov dword [esp + 0x18], eax
je 0x40966f
mov eax, dword [esp + 0x10]
sub eax, ebx
je 0x409551
dec eax
je 0x40953b
dec eax
jne 0x409569
lea eax, [esi + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
add edi, 0x40
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x409569
mov edx, dword [0x41a730]
push ebx
add edx, 0x34
push edx
call ebp
test eax, eax
je 0x409532
mov dword [esp + 0x10], 1
jmp 0x409417
mov dword [esp + 0x10], ebx
jmp 0x409422
lea ecx, [esi + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
add edi, 0x3c
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x409569
lea edx, [esi + 0xc]
push 1
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
add edi, 0xc
push 1
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [esi + 0x40], ebx
je 0x40958c
push 1
push 0x41a270
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
call fcn.00404c00
add esp, 4
mov eax, dword [esi + 0x44]
xor edi, edi
cmp eax, ebx
jle 0x4095c8
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x8c]
push eax
push ecx
push esi
call fcn.004091c0
add esp, 0xc
cmp eax, 1
mov dword [esp + 0x24], eax
jne 0x4095b8
inc dword [esp + 0x20]
cmp dword [esp + 0x10], ebx
jne 0x4095cc
mov ecx, dword [esi + 0x44]
inc edi
cmp edi, ecx
jl 0x409595
jmp 0x4095cc
mov eax, dword [esp + 0x24]
cmp eax, 1
jne 0x4095fe
mov edx, dword [0x41a730]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
add edx, 0x1c
push edx
call esi
mov eax, dword [0x41a730]
add eax, 0x20
push eax
call esi
mov ecx, dword [esp + 0x10]
push ecx
push 0x41a75c
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x209c]
inc eax
cmp eax, ecx
mov dword [esp + 0x28], eax
jl 0x409435
cmp dword [esp + 0x20], ebx
jle 0x409632
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x8c]
push edx
push eax
push ebx
call fcn.00405b50
add esp, 0xc
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x409649
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x409660
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2080
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2080
ret