Function at 0x405f90
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov dword [ebp - 4], 0
call fcn.004062f0
mov eax, dword [ebp + 8]
mov dword [0x41a13c], eax
push 0x416a98
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x41a174], eax
cmp dword [0x41a174], 0
jne 0x405fdb
mov ecx, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x41a174], ecx
push 0x416a8c
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x41a178], eax
cmp dword [0x41a178], 0
jne 0x40600c
mov edx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x41a178], edx
push 0x416a78
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x41a17c], eax
cmp dword [0x41a17c], 0
jne 0x40603b
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [0x41a17c], eax
push 0x416a68
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x41a180], eax
cmp dword [0x41a180], 0
jne 0x40606c
mov ecx, dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [0x41a180], ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00406350
add esp, 4
test eax, eax
je 0x406090
mov eax, dword [ebp + 8]
push eax
call fcn.00406450
add esp, 4
mov dword [ebp - 4], eax
call fcn.00406a60
cmp dword [0x41a18c], 0
je 0x4060b0
mov ecx, dword [0x41a18c]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [0x41a18c], 0
cmp dword [ebp - 4], 0
je 0x406159
cmp dword [0x41a188], 0
jne 0x406154
mov dword [ebp - 0xc], 0
mov edx, 0x11111111
and edx, 1
je 0x4060e6
push 0
push 1
call fcn.00406240
mov dword [ebp - 0x10], eax
jmp 0x4060ed
mov dword [ebp - 0x10], 1
mov eax, 0x11111111
and eax, 0x10
je 0x406105
push 0
push 2
call fcn.00406240
mov dword [ebp - 8], eax
jmp 0x40610c
mov dword [ebp - 8], 2
push 0
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x10]
push edx
push 0
call fcn.004055a0
mov dword [ebp - 0xc], eax
mov eax, 0x11111111
and eax, 1
je 0x40613a
cmp dword [ebp - 0x10], 0
je 0x40613a
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, 0x11111111
and edx, 0x10
je 0x406154
cmp dword [ebp - 8], 0
je 0x406154
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x406204
mov dword [ebp - 0x18], 0
mov ecx, 0x11111111
and ecx, 1
je 0x406178
push 0
push 3
call fcn.00406240
mov dword [ebp - 0x1c], eax
jmp 0x40617f
mov dword [ebp - 0x1c], 3
mov edx, 0x11111111
and edx, 0x10
je 0x406197
push 0
push 2
call fcn.00406240
mov dword [ebp - 0x14], eax
jmp 0x40619e
mov dword [ebp - 0x14], 2
push 0x30
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
push 0
call fcn.004055a0
mov dword [ebp - 0x18], eax
mov edx, 0x11111111
and edx, 1
je 0x4061cc
cmp dword [ebp - 0x1c], 0
je 0x4061cc
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, 0x11111111
and ecx, 0x10
je 0x4061e6
cmp dword [ebp - 0x14], 0
je 0x4061e6
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [0x41a190], 0
je 0x4061fd
push 0
mov eax, dword [0x41a190]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, 0x3e7
jmp 0x40622b
cmp dword [0x41a190], 0
je 0x406229
push 0
mov ecx, dword [0x41a190]
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov edx, dword [0x41a190]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov esp, ebp
pop ebp
ret 0x10