Function at 0x414851
Capabilities:
Hide graphical window

Disassembly:
push ecx
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x41486a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x3c], 0
mov eax, dword [esp + 0x14]
push eax
push str.OnMissionCompleted:_d
push 0x4396a0
call fcn.00404420
mov al, byte [0x43b3bc]
add esp, 0xc
test al, 2
je 0x414b3d
mov ecx, dword [esi + 0x58]
push ebx
push 0
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
mov al, byte [0x4397e1]
test al, al
je 0x414944
push 0xffffffffffffffff
lea edx, [esp + 0x10]
push 0xab
push edx
call fcn.00422b30
mov ecx, dword [esi + 0x48]
mov ebx, eax
lea edi, [esi + 0x48]
add esp, 0xc
mov eax, dword [ebx]
cmp ecx, eax
je 0x414908
mov edx, dword [ecx - 0xc]
test edx, edx
jge 0x4148de
mov edx, dword [0x4350bc]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x4148e5
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x4148f3
push eax
mov eax, dword [eax - 8]
push eax
mov ecx, edi
call fcn.00401f40
jmp 0x414908
mov ecx, edi
call fcn.00401e30
mov ebx, dword [ebx]
mov dword [edi], ebx
add ebx, 0xfffffff4
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0xc]
mov edx, dword [0x4350bc]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x414b25
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x414b25
mov edx, dword [esp + 0xc]
add edx, 0xfffffff4
push edx
call fcn.00426ac0
add esp, 4
jmp 0x414b25
mov eax, dword [0x43b3b8]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
cmp eax, 5
jne 0x4149e4
push 0xffffffffffffffff
lea eax, [esp + 0x14]
push 0x147
push eax
call fcn.00422b30
mov ecx, dword [esi + 0x48]
mov ebx, eax
lea edi, [esi + 0x48]
add esp, 0xc
mov eax, dword [ebx]
cmp ecx, eax
je 0x4149b5
mov edx, dword [ecx - 0xc]
test edx, edx
jge 0x41498f
mov edx, dword [0x4350bc]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x414996
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x4149a4
mov ecx, dword [eax - 8]
push eax
push ecx
mov ecx, edi
call fcn.00401f40
jmp 0x4149b5
mov ecx, edi
call fcn.00401e30
mov ebx, dword [ebx]
mov dword [edi], ebx
add ebx, 0xfffffff4
push ebx
call ebp
mov eax, dword [esp + 0x10]
mov ecx, dword [0x4350bc]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4149e4
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4149e4
mov eax, dword [esp + 0x10]
add eax, 0xfffffff4
push eax
call fcn.00426ac0
add esp, 4
mov eax, dword [0x43b3b8]
cmp eax, 3
je 0x4149f7
cmp eax, 7
jne 0x414a82
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
push 0xa7
push ecx
call fcn.00422b30
mov ecx, dword [esi + 0x48]
mov ebx, eax
lea edi, [esi + 0x48]
add esp, 0xc
mov eax, dword [ebx]
cmp ecx, eax
je 0x414a53
mov edx, dword [ecx - 0xc]
test edx, edx
jge 0x414a2d
mov edx, dword [0x4350bc]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x414a34
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x414a42
mov edx, dword [eax - 8]
push eax
push edx
mov ecx, edi
call fcn.00401f40
jmp 0x414a53
mov ecx, edi
call fcn.00401e30
mov ebx, dword [ebx]
mov dword [edi], ebx
add ebx, 0xfffffff4
push ebx
call ebp
mov eax, dword [esp + 0x10]
mov edx, dword [0x4350bc]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x414a82
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x414a82
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00426ac0
add esp, 4
cmp dword [0x43b3b8], 4
jne 0x414b1a
push 0xffffffffffffffff
lea eax, [esp + 0x14]
push 0xa9
push eax
call fcn.00422b30
mov ecx, dword [esi + 0x48]
mov ebx, eax
lea edi, [esi + 0x48]
add esp, 0xc
mov eax, dword [ebx]
cmp ecx, eax
je 0x414aeb
mov edx, dword [ecx - 0xc]
test edx, edx
jge 0x414ac5
mov edx, dword [0x4350bc]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x414acc
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x414ada
mov ecx, dword [eax - 8]
push eax
push ecx
mov ecx, edi
call fcn.00401f40
jmp 0x414aeb
mov ecx, edi
call fcn.00401e30
mov ebx, dword [ebx]
mov dword [edi], ebx
add ebx, 0xfffffff4
push ebx
call ebp
mov eax, dword [esp + 0x10]
mov ecx, dword [0x4350bc]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x414b1a
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x414b1a
mov eax, dword [esp + 0x10]
add eax, 0xfffffff4
push eax
call fcn.00426ac0
add esp, 4
push 0x1e
lea ecx, [esi + 0x5c]
call fcn.00411cb0
pop ebp
mov ecx, dword [esi + 0x48]
lea edi, [esi + 0x5c]
push ecx
mov ecx, edi
call fcn.00411800
push 2
mov ecx, edi
call fcn.00411c80
pop ebx
mov eax, dword [esp + 0x14]
test eax, eax
je 0x414b8d
mov edx, dword [esi + 4]
push edx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x414b8d
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.USER32.dll_GetParent]
mov esi, eax
test esi, esi
je 0x414c22
push 0x3ea
push esi
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
push 0x3ea
push 0x111
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
pop edi
xor eax, eax
pop esi
pop ecx
ret 0x10
mov ecx, dword [esi + 0x58]
mov edi, dword [sym.imp.USER32.dll_ShowWindow]
push 0
push ecx
call edi
mov eax, dword [esi + 0x34]
test eax, eax
je 0x414bf1
push 0xffffffffffffffff
lea edx, [esp + 0x18]
push 0x66
push edx
call fcn.00422b30
mov eax, dword [eax]
add esp, 0xc
push eax
mov eax, dword [esi + 0x50]
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov eax, dword [esp + 0x14]
mov edx, dword [0x4350bc]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x414c05
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x414c05
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.00426ac0
add esp, 4
jmp 0x414c05
mov eax, dword [esi + 0x4c]
push 5
push eax
call edi
mov ecx, dword [esi + 0x4c]
push 1
push ecx
call dword [sym.imp.USER32.dll_EnableWindow]
mov edx, dword [esi + 4]
push edx
call dword [sym.imp.USER32.dll_GetParent]
push 1
push 0x3f0
push 0x1410
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
pop edi
xor eax, eax
pop esi
pop ecx
ret 0x10