Function at 0x4015ce
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1b8
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 8], 0
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x40], 0
mov edx, dword [ebp - 0x38]
mov dword [edx], 0xfaaf3aab
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x44], 0
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x20], 0x40
cmp dword [ebp - 0x44], 0
jne 0x40165a
push 4
push 0x1000
push 0x1000
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 0x8002
push 0x3e8
mov ecx, dword [ebp - 0x44]
add ecx, 0x4100
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
test eax, eax
jne 0x401681
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x20]
push edx
push 0x1000
mov eax, dword [0x4378b8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x288], eax
mov edx, dword [ebp - 4]
cmp dword [edx + 0x288], 0
je 0x4016ba
mov eax, dword [ebp - 4]
mov dword [eax + 0x3d4], 8
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x3e8]
add edx, 0x13
mov eax, dword [ebp - 4]
mov dword [eax + 0x3e8], edx
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x288], 0
je 0x401985
cmp dword [ebp - 0x18], 0x57
jne 0x401985
mov edx, dword [ebp - 4]
cmp dword [edx + 0x3d4], 8
jne 0x401703
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x3e8]
mov dword [ebp - 0x48], ecx
jmp 0x401710
mov edx, dword [ebp - 4]
mov dword [edx + 0x3e8], 0
push 0x140
push 0
lea eax, [ebp - 0x188]
push eax
call fcn.004063f0
add esp, 0xc
mov ecx, dword [ebp - 4]
mov edx, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ecx + 0x404], edx
mov eax, dword [0x4378b8]
mov dword [ebp - 0x18c], eax
mov ecx, dword [ebp - 4]
mov edx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ecx + 0x3a0], edx
mov eax, dword [ebp - 4]
cmp dword [eax + 0x3a0], 0
jbe 0x401964
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x3d4], 8
jne 0x401964
mov dword [ebp - 0x1a8], 0
mov dword [ebp - 0x198], 4
mov dword [ebp - 0x1a4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1a4], eax
mov dword [ebp - 0x14], 0x434
push 0
push 0
push 3
push 0
push 0xfffff001
push 2
push 0x4378d8
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x19c], eax
mov dword [ebp - 0x1a0], 0
cmp dword [ebp - 0x14], 0
je 0x4017db
push 0x8e032222
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 4
mov edx, dword [ebp - 4]
add edx, 0x2f0
push edx
lea eax, [ebp - 0x24]
push eax
call fcn.004060b0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x194], eax
mov dword [ebp - 0x194], 0x7b
mov ecx, dword [ebp - 0x24]
add ecx, 0xf4393
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], 0
mov edx, dword [ebp - 0x20]
cmp edx, dword [0x4378b8]
jae 0x401962
cmp dword [ebp - 0x194], 0x7b
jne 0x401962
mov dword [ebp - 0x1a8], 0
jmp 0x40185c
mov eax, dword [ebp - 0x1a8]
add eax, 1
mov dword [ebp - 0x1a8], eax
mov ecx, dword [ebp - 0x20]
add ecx, 1
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x1a8], 4
jae 0x4018b5
mov edx, dword [ebp - 0x20]
cmp edx, dword [0x4378b8]
jae 0x4018b5
mov eax, dword [ebp - 0x1a8]
mov cl, byte [ebp + eax - 0x24]
mov byte [ebp - 0x1b0], cl
mov edx, dword [ebp - 0x48]
add edx, dword [ebp - 0x20]
xor eax, eax
mov al, byte [edx]
mov ecx, dword [ebp - 0x1b0]
and ecx, 0xff
xor eax, ecx
mov byte [ebp - 0x1ac], al
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x288]
mov ecx, dword [ebp - 0x20]
mov dl, byte [ebp - 0x1ac]
mov byte [eax + ecx], dl
jmp 0x401844
cmp dword [ebp - 0x20], 0
jbe 0x401956
mov dword [ebp - 0x1a8], 0
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x1a8]
mov cl, byte [eax + 0x374]
mov byte [ebp - 0x1b4], cl
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x1b8], edx
mov eax, dword [ebp - 0x48]
add eax, dword [ebp - 0x1b8]
mov cl, byte [eax]
mov byte [ebp - 0x1ac], cl
mov ah, byte [ebp - 0x1ac]
mov al, byte [ebp - 0x1b4]
xor ah, al
mov byte [ebp - 0x1ac], ah
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x288]
mov ecx, dword [ebp - 0x20]
mov dl, byte [ebp - 0x1ac]
mov byte [eax + ecx], dl
mov eax, dword [ebp - 0x1a8]
add eax, 1
mov dword [ebp - 0x1a8], eax
mov ecx, dword [ebp - 0x20]
add ecx, 1
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x1a8]
cmp edx, dword [ebp - 0x198]
jae 0x401956
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x18c]
jb 0x4018c9
mov dword [ebp - 0x40], 1
jmp 0x40181c
jmp 0x40196d
mov ecx, dword [ebp - 4]
push ecx
call fcn.00403191
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x288]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x20]
mov dword [ecx + 0x2b4], edx
cmp dword [ebp - 0x40], 0
jne 0x401992
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x20]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret