Function at 0x407d40
Capabilities:
Terminate process

Disassembly:
push 0xffffffffffffffff
push 0x49d9e9
mov eax, dword fs:[0]
push eax
sub esp, 0x15c
mov eax, dword [0x4cba68]
xor eax, esp
mov dword [esp + 0x158], eax
push ebp
push esi
push edi
mov eax, dword [0x4cba68]
xor eax, esp
push eax
lea eax, [esp + 0x16c]
mov dword fs:[0], eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x174], 0
call fcn.00460a7a
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x407da3
push 0x80004005
call fcn.004010e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x10], esi
mov ebp, dword [esp + 0x17c]
add ebp, 0xfffffff0
push ebp
mov byte [esp + 0x178], 1
mov dword [esp + 0x28], ebp
call fcn.004017c0
lea edi, [eax + 0x10]
add esp, 4
mov dword [esp + 0x14], edi
lea ecx, [esp + 0x2c]
mov byte [esp + 0x174], 2
mov dword [esp + 0x20], 0xffffffff
call fcn.0042b840
push 0
lea ecx, [esp + 0x30]
mov byte [esp + 0x178], 3
call fcn.0042b890
test al, al
jne 0x407e92
lea ecx, [esp + 0x2c]
mov byte [esp + 0x174], 2
call fcn.0042b860
lea eax, [edi - 0x10]
mov byte [esp + 0x174], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407e42
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [esp + 0x174], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407e66
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x174], 0xffffffff
lea ecx, [ebp + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407e8b
mov ecx, dword [ebp]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebp
call edx
xor eax, eax
jmp 0x40808b
lea ecx, [esp + 0x14]
call fcn.00406ac0
lea ecx, [esp + 0x2c]
call fcn.0042c4a0
mov edi, eax
test edi, edi
mov dword [esp + 0x18], edi
je 0x407ffa
call fcn.004316a0
push 0xffffffffffffffff
lea eax, [esp + 0x64]
push eax
push edi
lea ecx, [esp + 0x38]
call fcn.0042c0e0
test al, al
je 0x407ffa
lea eax, [esp + 0x64]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x407ed7
sub eax, edx
push eax
lea ecx, [esp + 0x68]
push ecx
lea ecx, [esp + 0x18]
call fcn.00401dd0
mov esi, dword [esp + 0x10]
mov edi, dword [esi - 0xc]
mov eax, dword [esi - 8]
mov ebp, 1
mov ecx, ebp
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x407f19
push edi
lea ecx, [esp + 0x14]
call fcn.00401770
mov esi, dword [esp + 0x10]
lea edx, [edi + 1]
push edx
push esi
call fcn.0048281e
push eax
call fcn.00401050
add esp, 0xc
test edi, edi
jl 0x4080b4
cmp edi, dword [esi - 8]
jg 0x4080b4
mov eax, dword [esp + 0x14]
test eax, eax
mov dword [esi - 0xc], edi
mov byte [edi + esi], 0
je 0x407fd5
cmp dword [esi - 0xc], 0
jl 0x407fd5
push eax
push esi
call fcn.004819a0
add esp, 8
test eax, eax
je 0x407fd5
sub eax, esi
js 0x407fd5
mov eax, dword [esp + 0x60]
push eax
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x407fce
mov ecx, dword [esp + 0x60]
push ecx
call fcn.004323c0
add esp, 4
push 0x1388
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x407fa4
mov edx, dword [esp + 0x1c]
mov dword [edx + 0x60], ebp
lea eax, [esp + 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x407fbe
cmp dword [esp + 0x20], 0x103
jne 0x407fce
push 0
push edi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 0x60], ebp
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
push 0xffffffffffffffff
lea edx, [esp + 0x64]
push edx
push eax
lea ecx, [esp + 0x38]
call fcn.0042c0e0
test al, al
jne 0x407ed0
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x18]
push edi
lea ecx, [esp + 0x30]
call fcn.0042bf70
lea ecx, [esp + 0x2c]
mov byte [esp + 0x174], 2
call fcn.0042b860
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x174], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40803d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [esp + 0x174], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408061
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x174], 0xffffffff
lea ecx, [ebp + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408086
mov ecx, dword [ebp]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebp
call edx
mov eax, 1
mov ecx, dword [esp + 0x16c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x158]
xor ecx, esp
call fcn.004820a1
add esp, 0x168
ret 4
push 0x80070057
call fcn.004010e0
int3