Function at 0x401a84
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push edi
mov edi, ecx
mov ecx, dword [eax]
lea edx, [edi + 0xc]
mov dword [ebp - 0x10], ecx
call fcn.00401eea
test al, al
je 0x401dbd
cmp dword [edi + 8], ecx
jae 0x401dbd
push edi
lea edi, [ebp - 0x10]
call fcn.00401f12
mov edi, eax
cmp dword [edi + 0x10], 0x80051a85
pop ecx
jne 0x401db9
and dword [ebp - 4], 0
cmp dword [esi + 0x2bfc], 0
jle 0x401be5
mov dword [ebp - 0xc], 0xfffff5f8
sub dword [ebp - 0xc], esi
lea ebx, [esi + 0xa08]
mov eax, dword [edi + 0x18]
cmp eax, dword [ebx - 0x108]
jne 0x401bcd
mov eax, dword [0x429ca4]
cmp eax, dword [edi + 0x20]
je 0x401be5
mov eax, dword [ebx]
test eax, eax
jle 0x401b11
cmp eax, 0x10
jl 0x401b11
and dword [ebx], 0
mov eax, dword [edi + 0x24]
mov dword [ebp - 8], eax
cmp eax, 0x6400000
ja 0x401b64
test eax, eax
jne 0x401b29
mov dword [ebp - 8], 1
add dword [ebp - 8], 4
cmp dword [0x42ca0c], 0
jne 0x401b3f
call fcn.00405c10
test al, al
je 0x401b64
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 8]
push 8
push dword [0x42ca0c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
jne 0x401b66
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
xor eax, eax
mov edx, dword [ebx]
mov ecx, dword [ebp - 0xc]
add ecx, ebx
shl edx, 4
add edx, ecx
mov dword [edx + esi + 0x908], eax
mov eax, dword [ebx]
shl eax, 4
add eax, ecx
cmp dword [eax + esi + 0x908], 0
je 0x401bcd
mov edx, dword [edi + 0x24]
mov dword [eax + esi + 0x90c], edx
mov eax, dword [ebx]
mov edx, dword [edi + 0x20]
add eax, 0x91
shl eax, 4
add eax, ecx
mov dword [eax + esi], edx
mov eax, dword [edi + 0x20]
push dword [edi + 0x24]
mov dword [0x429ca4], eax
lea eax, [edi + 0x36]
push eax
mov eax, dword [ebx]
shl eax, 4
add eax, ecx
push dword [eax + esi + 0x908]
call fcn.00412d60
add esp, 0xc
inc dword [ebx]
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add ebx, 0x118
cmp eax, dword [esi + 0x2bfc]
jl 0x401ae6
and dword [ebp - 4], 0
cmp dword [esi + 0x4f00], 0
jle 0x401d0e
mov dword [ebp - 0xc], 0xffffd2f4
sub dword [ebp - 0xc], esi
lea ebx, [esi + 0x2d0c]
mov eax, dword [edi + 0x18]
cmp eax, dword [ebx - 0x108]
jne 0x401cf6
mov eax, dword [0x429ca4]
cmp eax, dword [edi + 0x20]
je 0x401d0e
mov eax, dword [ebx]
xor ecx, ecx
cmp eax, ecx
jle 0x401c32
cmp eax, 0x10
jl 0x401c32
mov dword [ebx], ecx
mov eax, dword [edi + 0x24]
mov dword [ebp - 8], eax
cmp eax, 0x6400000
ja 0x401c86
cmp eax, ecx
jne 0x401c4a
mov dword [ebp - 8], 1
add dword [ebp - 8], 4
cmp dword [0x42ca0c], ecx
jne 0x401c63
call fcn.00405c10
test al, al
jne 0x401c63
xor ecx, ecx
jmp 0x401c86
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 8]
push 8
push dword [0x42ca0c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x401b5c
mov ecx, eax
mov edx, dword [ebx]
mov eax, dword [ebp - 0xc]
shl edx, 4
add eax, ebx
add edx, eax
mov dword [edx + esi + 0x2c0c], ecx
mov ecx, dword [ebx]
mov edx, ecx
shl edx, 4
add edx, eax
cmp dword [edx + esi + 0x2c0c], 0
je 0x401cf6
mov edx, dword [edi + 0x24]
add ecx, 0x2c1
shl ecx, 4
add ecx, eax
mov dword [ecx + esi], edx
mov ecx, dword [ebx]
mov edx, dword [edi + 0x20]
shl ecx, 4
add ecx, eax
mov dword [ecx + esi + 0x2c14], edx
mov ecx, dword [edi + 0x20]
push dword [edi + 0x24]
mov dword [0x429ca4], ecx
lea ecx, [edi + 0x36]
push ecx
mov ecx, dword [ebx]
shl ecx, 4
add ecx, eax
push dword [ecx + esi + 0x2c0c]
call fcn.00412d60
add esp, 0xc
inc dword [ebx]
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add ebx, 0x118
cmp eax, dword [esi + 0x4f00]
jl 0x401c06
mov byte [esi + 0x581c], 0
mov ecx, dword [edi + 0x18]
cmp ecx, 0xff00aaee
je 0x401d2f
cmp ecx, 0xff00bb00
jne 0x401da5
mov byte [esi + 0x581c], 1
push dword [esi + 0x5814]
call fcn.00405c44
mov ebx, dword [edi + 0x24]
cmp ebx, 0x6400000
ja 0x401d82
test ebx, ebx
jne 0x401d4a
inc ebx
add ebx, 4
cmp dword [0x42ca0c], 0
jne 0x401d5f
call fcn.00405c10
test al, al
je 0x401d82
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
push 8
push dword [0x42ca0c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x401b5c
mov ecx, eax
jmp 0x401d84
xor ecx, ecx
mov dword [esi + 0x5814], ecx
test ecx, ecx
je 0x401da5
mov eax, dword [edi + 0x24]
push eax
mov dword [esi + 0x5818], eax
lea eax, [edi + 0x36]
push eax
push ecx
call fcn.00412d60
add esp, 0xc
push edi
lea edi, [ebp - 0x10]
call fcn.00401f12
mov edi, eax
pop ecx
test edi, edi
jne 0x401ac5
mov al, 1
jmp 0x401dbf
xor al, al
pop edi
pop ebx
leave
ret