Function at 0x474d44
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.00453694
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 0x474df0
call fcn.004091d0
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.00403f30
lea ecx, [esp + 0x20]
call fcn.00402250
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.004648dd
test al, al
jne 0x474e40
call fcn.004091d0
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.00403f30
lea ecx, [esp + 0x20]
call fcn.00402250
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 0x474ee4
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.00453694
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.00463d43
test al, al
je 0x474fe3
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.00402250
mov eax, dword [esp + 0x14]
add dword [esp + 0x18], 0x18
inc eax
mov dword [esp + 0x14], eax
cmp eax, dword [esp + 0x4c]
jl 0x474e71
cmp byte [ebp + 0x14], 0
je 0x475025
mov eax, dword [ebx + 4]
mov eax, dword [eax + 4]
push eax
call fcn.0044b6db
mov dword [esp + 0x40], eax
mov eax, 4
sub eax, edi
push eax
push ebx
lea ecx, [esp + 0x48]
push ecx
call fcn.00457a92
lea edx, [esp + 0x40]
push edx
call fcn.00410e9c
test eax, eax
jne 0x474f3b
mov eax, dword [ebp + 8]
push 0xffffffffffffffff
push 0x67
push eax
call fcn.0045ea4f
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.0040e9f0
add esp, 8
cmp dword [esp + 0x50], 1
jne 0x474f6f
push 0
push 1
push 0
mov edi, esi
call fcn.0040d190
add esp, 0xc
push eax
lea edx, [esp + 0x5c]
push edx
call fcn.0046c56d
xor eax, eax
cmp dword [esp + 0x4c], eax
jle 0x474faf
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.0040d190
mov edi, dword [esp + 0x20]
add esp, 0xc
push eax
push edi
call fcn.0046c56d
mov eax, dword [esp + 0x10]
add edi, 0x18
mov dword [esp + 0x14], edi
cmp eax, dword [esp + 0x4c]
jl 0x474f7f
cmp byte [ebp + 0x14], 0
jne 0x474fcf
mov edx, dword [ebx + 4]
mov eax, dword [edx]
push eax
call fcn.00443b22
test al, al
je 0x474fcf
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 0x20]
call fcn.00402250
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call fcn.004091d0
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.00403f30
lea ecx, [esp + 0x30]
call fcn.00402250
lea ecx, [esp + 0x20]
call fcn.00402250
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.00464a0f
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x474efe
call fcn.004091d0
lea ecx, [esp + 0x20]
mov dword [esi + 8], 1
mov dword [esi], 0
call fcn.00402250
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10