Function at 0x474719
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x364
xor eax, eax
cmp byte [ebp + 0x14], al
push ebx
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebx + 4]
setne al
push esi
mov esi, dword [ebp + 0x10]
push edi
mov dword [esp + 0x1c], 0
movsx edi, ax
lea eax, [edi*4]
sub ecx, eax
mov eax, dword [ecx + 4]
push eax
call fcn.00452e60
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [esp + 0x20], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
inc dword [eax]
mov dword [esp + 0x2c], eax
mov eax, dword [ebx + 8]
mov dword [esp + 0x24], ecx
lea ecx, [eax + edi - 3]
mov dword [esp + 0x28], edx
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
lea edx, [eax + eax]
mov dword [esp + 0x4c], ecx
cmp edx, ecx
je 0x4747c5
call fcn.004091e0
mov ecx, dword [ebp + 8]
mov dword [esi + 8], 1
mov dword [esi], 0
mov eax, dword [ecx]
mov eax, dword [eax + 4]
push 0
push 4
add eax, ecx
call fcn.00403f40
lea ecx, [esp + 0x20]
call fcn.00402260
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x54], eax
call fcn.0046407c
test al, al
jne 0x474815
call fcn.004091e0
mov ecx, dword [ebp + 8]
mov dword [esi + 8], 1
mov dword [esi], 0
mov eax, dword [ecx]
mov eax, dword [eax + 4]
push 0
push 2
add eax, ecx
call fcn.00403f40
lea ecx, [esp + 0x20]
call fcn.00402260
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
xor ecx, ecx
mov eax, 3
sub eax, edi
mov dword [esp + 0x48], ecx
mov dword [esp + 0x14], ecx
cmp dword [esp + 0x4c], ecx
jle 0x4748b9
lea ecx, [eax*4]
lea edx, [esp + 0x80]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], edx
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + eax]
push eax
call fcn.00452e60
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [esp + 0x30], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
inc dword [eax]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x34], ecx
push eax
lea ecx, [esp + 0x34]
push ecx
mov dword [esp + 0x40], edx
call fcn.004634e2
test al, al
je 0x4749b8
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
add dword [esp + 0x48], eax
add dword [esp + 0x10], 8
lea ecx, [esp + 0x30]
call fcn.00402260
mov eax, dword [esp + 0x14]
add dword [esp + 0x18], 0x18
inc eax
mov dword [esp + 0x14], eax
cmp eax, dword [esp + 0x4c]
jl 0x474846
cmp byte [ebp + 0x14], 0
je 0x4749fa
mov eax, dword [ebx + 4]
mov eax, dword [eax + 4]
push eax
call fcn.0044b01e
mov dword [esp + 0x40], eax
mov eax, 4
sub eax, edi
push eax
push ebx
lea ecx, [esp + 0x48]
push ecx
call fcn.0045725e
lea edx, [esp + 0x40]
push edx
call fcn.00410e9c
test eax, eax
jne 0x474910
mov eax, dword [ebp + 8]
push 0xffffffffffffffff
push 0x67
push eax
call fcn.0045e1ee
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [esp + 0x4c]
inc ecx
push ecx
push 1
mov eax, esi
call fcn.0040ea00
add esp, 8
cmp dword [esp + 0x50], 1
jne 0x474944
push 0
push 1
push 0
mov edi, esi
call fcn.0040d1a0
add esp, 0xc
push eax
lea edx, [esp + 0x5c]
push edx
call fcn.0046bd0c
xor eax, eax
cmp dword [esp + 0x4c], eax
jle 0x474984
lea ecx, [esp + 0x70]
mov dword [esp + 0x14], ecx
inc eax
push eax
push 1
push 0
mov edi, esi
mov dword [esp + 0x1c], eax
call fcn.0040d1a0
mov edi, dword [esp + 0x20]
add esp, 0xc
push eax
push edi
call fcn.0046bd0c
mov eax, dword [esp + 0x10]
add edi, 0x18
mov dword [esp + 0x14], edi
cmp eax, dword [esp + 0x4c]
jl 0x474954
cmp byte [ebp + 0x14], 0
jne 0x4749a4
mov edx, dword [ebx + 4]
mov eax, dword [edx]
push eax
call fcn.0044357d
test al, al
je 0x4749a4
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 0x20]
call fcn.00402260
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call fcn.004091e0
mov ecx, dword [ebp + 8]
mov dword [esi + 8], 1
mov dword [esi], 0
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 0
push 1
add eax, ecx
call fcn.00403f40
lea ecx, [esp + 0x30]
call fcn.00402260
lea ecx, [esp + 0x20]
call fcn.00402260
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [ebp + 8]
push ebx
lea ecx, [esp + 0x44]
push ecx
push edx
call fcn.004641ae
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4748d3
call fcn.004091e0
lea ecx, [esp + 0x20]
mov dword [esi + 8], 1
mov dword [esi], 0
call fcn.00402260
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10