Function at 0x497660
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
mov esi, ecx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov edi, edx
mov dword [esp + 0x10], edi
test esi, esi
je 0x497a35
call fcn.004ae5d0
test eax, eax
je 0x497a35
cmp dword [esi + 0x34], 0
je 0x4976d8
push dword [ebp + 0xc]
mov edx, edi
mov ecx, esi
push dword [ebp + 8]
call fcn.00497030
add esp, 8
cmp dword [esi + 0x34], 0
jne 0x4976ce
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x4976ce
push dword [esi + 0xc]
mov dword [esi + 0x34], 1
push esi
call eax
add esp, 8
mov eax, dword [esi + 0x34]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x2c]
mov ecx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
je 0x4976f3
cmp eax, edi
je 0x4977bb
push 0xffffffffffffffff
push dword [esi + 0x18]
call ecx
push 0
push 1
push dword [esi + 0x18]
mov dword [esi + 0x24], 1
call ebx
mov eax, dword [esi + 0x14]
mov dword [esi + 0x1c], 0
test eax, eax
je 0x497722
inc dword [esi + 0x1c]
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x497718
mov ebx, dword [esi + 0x1c]
mov dword [esp + 0x1c], ebx
mov ebx, dword [esi + 0x14]
test ebx, ebx
je 0x4977a4
mov edi, dword [ebx + 4]
test edi, edi
je 0x497826
push dword [edi + 0x2c]
mov eax, dword [esp + 0x14]
push dword [ebp + 0xc]
mov dword [edi + 0x34], eax
push dword [ebp + 8]
mov eax, dword [edi + 0x1c]
push edi
mov dword [edi + 0x30], 0xffffffff
call eax
add esp, 0x10
cmp eax, 0xfffffffc
je 0x497777
test eax, eax
je 0x497787
cmp eax, 1
jne 0x497799
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
push esi
push edi
call fcn.00497280
add esp, 8
test eax, eax
jne 0x4977a0
jmp 0x497799
mov dword [edi + 0x10], fcn.00497280
mov dword [edi + 0x14], esi
mov dword [esp + 0x14], 1
mov ebx, dword [ebx + 0xc]
test ebx, ebx
jne 0x497730
mov edi, dword [esp + 0x10]
cmp dword [esp + 0x1c], 0
jne 0x497973
mov ecx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push 0xffffffffffffffff
push dword [esi + 0x18]
call ecx
push 0
push 1
push dword [esi + 0x18]
mov dword [esi + 0x24], 0
call ebx
mov ecx, dword [esi + 0x4c]
mov edx, 0x6166e0
call fcn.0045da70
test eax, eax
je 0x4979fc
mov ecx, dword [esi + 4]
call fcn.004b48c0
test eax, eax
je 0x49798a
test edi, edi
jne 0x4978e8
mov ecx, dword [esi]
xor edx, edx
push 3
call fcn.004146b0
mov ebx, dword [ebp + 0xc]
add esp, 4
mov ecx, dword [esi]
or edx, 0xffffffff
push ebx
push dword [ebp + 8]
call fcn.0040de10
add esp, 8
jmp 0x4978eb
cmp dword [ebx], 0
je 0x497799
cmp dword [esp + 0x18], 0
jne 0x497799
mov edi, dword [esi + 4]
cmp dword [edi + 8], 0
je 0x4978bf
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [edi + 8], eax
je 0x4978bf
mov eax, dword [ebp + 0xc]
add eax, 0xc
push eax
mov dword [esp + 0x1c], eax
call fcn.0058d200
mov edi, eax
add esp, 4
test edi, edi
je 0x497a41
push dword [esp + 0x18]
push 0
push edi
call fcn.005869c0
mov eax, dword [esp + 0x1c]
lea ecx, [edi + 0xc]
add esp, 0xc
mov dword [edi + 8], eax
mov eax, dword [ebp + 0xc]
mov edx, eax
mov dword [edi], esi
mov dword [edi + 4], eax
push eax
push dword [ebp + 8]
call fcn.00401000
mov ecx, dword [esi + 4]
mov edx, 0x497610
push edi
push 0
mov dword [esp + 0x28], 1
mov dword [esp + 0x24], 1
call fcn.004ae9f0
add esp, 0x10
jmp 0x497799
push dword [ebp + 0xc]
mov edx, dword [ebx]
mov ecx, esi
push dword [ebp + 8]
call fcn.00497370
add esp, 8
sub eax, 0
je 0x497791
sub eax, 1
je 0x4977a0
jmp 0x497799
mov ebx, dword [ebp + 0xc]
mov edx, dword [esi + 8]
mov ecx, dword [esi]
call fcn.00414800
mov ecx, dword [esi]
or edx, 0xffffffff
push 0x6166e8
call fcn.0040f5e0
mov ecx, dword [esi]
add esp, 4
mov edx, 0xfffffffe
call fcn.00410cf0
mov ecx, dword [esi]
mov edx, 0x6166f0
call fcn.00413910
test edi, edi
jne 0x497936
push 1
push ebx
push ecx
mov ecx, dword [esi]
lea edx, [edi - 4]
call fcn.00414400
add esp, 0xc
jmp 0x497944
mov edx, dword [ebp + 8]
mov ecx, dword [esi]
push ebx
call fcn.00413880
add esp, 4
mov ecx, dword [esi]
mov edx, 2
push 0
call fcn.0040e020
add esp, 4
test eax, eax
je 0x497968
push 0x6234ab
push dword [esi]
call fcn.00470ba0
add esp, 8
mov ecx, dword [esi]
test edi, edi
jne 0x497983
call fcn.00414d90
cmp dword [esp + 0x14], 0
je 0x4976ce
jmp 0x4976b1
call fcn.00414cb0
jmp 0x497973
mov ebx, dword [ebp + 0xc]
lea eax, [ebx + 0xc]
push eax
call fcn.0058d200
mov edi, eax
add esp, 4
test edi, edi
je 0x497a41
lea eax, [ebx + 0xc]
push eax
push 0
push edi
call fcn.005869c0
mov eax, dword [esp + 0x1c]
lea ecx, [edi + 0xc]
add esp, 0xc
mov dword [edi + 4], ebx
mov edx, ebx
mov dword [edi + 8], eax
mov dword [edi], esi
push ebx
push dword [ebp + 8]
call fcn.00401000
mov ecx, dword [esi + 4]
add esp, 8
call fcn.004b48c0
push edi
test eax, eax
jne 0x4979ef
mov ecx, dword [esi + 4]
mov edx, fcn.004970f0
push eax
call fcn.004ae9f0
jmp 0x4976ae
push dword [esi + 4]
call fcn.004970f0
jmp 0x4976ae
cmp dword [esi + 0x3c], 0
je 0x497a17
mov ecx, dword [esi + 0x4c]
mov edx, 0x6166f8
call fcn.0045da70
test eax, eax
je 0x49769f
mov ecx, dword [esi + 0x4c]
mov edx, 0x6166fc
call fcn.0045da70
test eax, eax
je 0x497973
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0x4c4
mov edx, 0x61c4e8
xor ecx, ecx
call fcn.004b47e0
add esp, 0xc
push 0x4c4
push 0x61c504
push 0x61c520
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.00587d2d
int3