Function at 0x408988
Capabilities:
Terminate process

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x26c
mov ebx, dword [esp + 0x290]
mov dword [esp + 0x218], ecx
mov ebp, edx
mov esi, eax
test ecx, ecx
je 0x4089c0
test ebx, ebx
je 0x4089c0
lea eax, [ebx - 1]
je 0x4089c0
mov edx, dword [ecx + eax*4]
test edx, edx
jne 0x408a10
add eax, 0xffffffff
cmp eax, 0xffffffff
jne 0x4089b1
cmp ebx, 1
jbe 0x4089e5
lea eax, [ebx - 1]
cmp eax, 0x320
jle 0x4089fb
lea eax, [esi + 4]
lea ebx, [ebx*4 - 4]
push ebx
push 0
push eax
call fcn.0041d778
add esp, 0xc
mov dword [esi], 1
mov eax, 1
add esp, 0x26c
pop ebx
pop ebp
pop esi
pop edi
ret
lea edx, [esi + 4]
lea eax, [esi + ebx*4]
mov dword [edx], 0
add edx, 4
cmp edx, eax
jb 0x408a01
jmp 0x4089e5
add eax, 1
je 0x4089c0
mov edi, dword [esp + 0x218]
mov edi, dword [edi + eax*4 - 4]
xor ecx, ecx
mov edx, 0x80000000
test edx, edi
jne 0x408a34
shr edx, 1
add ecx, 1
test edx, edx
jne 0x408a27
shl eax, 5
sub eax, ecx
je 0x4089c0
cmp eax, 1
jne 0x408a6a
mov edi, dword [esp + 0x28c]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], ebx
mov eax, esi
mov edx, ebp
mov ecx, ebx
call fcn.0040a930
mov eax, 1
add esp, 0x26c
pop ebx
pop ebp
pop esi
pop edi
ret
xor edx, edx
mov dword [esp + 0x230], edx
cmp eax, dword [edx*4 + 0x42a61c]
jb 0x409651
add edx, 1
cmp edx, 8
jb 0x408a73
mov dword [esp + 0x230], edx
lea eax, [ebx + ebx]
mov dword [esp + 0x24c], eax
push 4
cmp eax, 1
jae 0x408aa5
mov eax, 1
push eax
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov dword [esp + 0x250], eax
test eax, eax
je 0x40962f
mov eax, dword [esp + 0x24c]
call fcn.00409694
mov dword [esp + 0x228], eax
mov eax, dword [esp + 0x24c]
call fcn.00409694
mov dword [esp + 0x258], eax
mov eax, dword [esp + 0x24c]
call fcn.00409694
mov dword [esp + 0x23c], eax
mov edi, dword [esp + 0x28c]
mov eax, dword [esp + 0x258]
mov dword [esp + 0x18], ebp
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], ebx
mov edx, ebp
mov ecx, ebp
call fcn.0040b060
mov ecx, dword [esp + 0x230]
add ecx, 0xffffffff
mov dword [esp + 0x230], ecx
mov eax, 1
shl eax, cl
mov dword [esp + 0x224], eax
cmp eax, 1
jbe 0x408ddf
mov eax, dword [esp + 0x24c]
mov dword [esp + 0x220], esi
mov ebp, 1
shl eax, 2
mov dword [esp + 0x254], eax
mov eax, dword [esp + 0x24c]
call fcn.00409694
mov edx, eax
mov esi, dword [esp + ebp*4 + 0x14]
mov dword [esp + ebp*4 + 0x18], edx
test ebx, ebx
jbe 0x408bf0
cmp ebx, 0x320
jbe 0x409198
mov dword [esp + 0x234], edx
mov edi, ebx
shl edi, 2
mov eax, edx
sub eax, esi
xor ecx, ecx
cmp eax, edi
setg cl
mov eax, esi
sub eax, edx
mov dword [esp + 0x268], eax
xor eax, eax
mov dword [esp + 0x244], eax
mov eax, dword [esp + 0x268]
cmp eax, edi
mov edx, dword [esp + 0x244]
setg dl
or ecx, edx
mov edx, dword [esp + 0x234]
je 0x409198
push edi
push esi
push edx
call fcn.0041d7d0
add esp, 0xc
mov edx, dword [esp + ebp*4 + 0x18]
mov ecx, dword [esp + 0x24c]
mov esi, edx
test ecx, ecx
jne 0x408c01
jmp 0x408c33
mov ecx, dword [esp + 0x24c]
mov esi, edx
test ecx, ecx
je 0x408d99
cmp ecx, 0x320
je 0x4091d7
mov eax, dword [esp + 0x254]
push eax
push 0
mov edx, dword [esp + 0x258]
push edx
call fcn.0041d778
add esp, 0xc
mov edx, dword [esp + ebp*4 + 0x18]
test ebx, ebx
jbe 0x408d99
mov ecx, dword [esi]
test ecx, ecx
je 0x408c5e
mov ecx, dword [esp + 0x250]
mov dword [esp + 0x25c], esi
mov dword [esp + 0x234], edx
xor eax, eax
mov dword [esp + 0x238], ebp
lea edi, [ecx + ebx*4]
xor ecx, ecx
jmp 0x408cae
mov ecx, dword [esp + 0x250]
mov dword [esp + 0x25c], esi
mov dword [esp + 0x234], edx
xor eax, eax
mov dword [esp + 0x238], ebp
lea edi, [ecx + ebx*4]
xor ecx, ecx
mov dword [ecx + edi], 0
add eax, 1
cmp eax, ebx
jae 0x4091c4
mov edx, dword [esp + 0x25c]
mov ecx, eax
shl ecx, 2
mov ebp, dword [edx + ecx]
test ebp, ebp
je 0x408c81
test ebx, ebx
jbe 0x4091bd
mov esi, dword [esp + 0x250]
mov dword [esp + 0x260], ecx
mov dword [esp + 0x22c], edi
xor edx, edx
mov dword [esp + 0x21c], eax
lea esi, [esi + ecx]
mov ebx, edx
mov dword [esp + 0x264], esi
mov eax, dword [esp + 0x258]
mov ebp, dword [esp + 0x25c]
mov ecx, dword [esp + 0x260]
mov esi, dword [eax + ebx*4]
mov eax, dword [ebp + ecx]
movzx edi, ax
mov dword [esp + 0x268], ebx
movzx ebx, si
shr esi, 0x10
shr eax, 0x10
mov ebp, ebx
imul ebp, edi
imul ebx, eax
imul edi, esi
imul eax, esi
add ebx, edi
cmp ebx, edi
mov edi, 0
adc edi, 0
mov ecx, ebx
shr ecx, 0x10
shl edi, 0x10
add ecx, edi
shl ebx, 0x10
add ebp, ebx
cmp ebp, ebx
adc ecx, 0
mov ebx, dword [esp + 0x268]
add ebp, edx
lea esi, [ecx + eax]
cmp ebp, edx
jae 0x408d49
lea esi, [ecx + eax + 1]
mov eax, dword [esp + 0x264]
mov edx, dword [eax + ebx*4]
add ebp, edx
cmp ebp, edx
jae 0x408d5c
add esi, 1
mov edx, eax
mov eax, dword [esp + 0x290]
mov dword [edx + ebx*4], ebp
mov edx, esi
add ebx, 1
cmp ebx, eax
jb 0x408cd8
mov ecx, dword [esp + 0x260]
mov edi, dword [esp + 0x22c]
mov eax, dword [esp + 0x21c]
mov ebx, dword [esp + 0x290]
mov dword [ecx + edi], edx
jmp 0x408c88
mov esi, dword [esp + 0x24c]
mov edi, dword [esp + 0x28c]
mov eax, dword [esp + 0x228]
mov ecx, dword [esp + 0x250]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], ebx
call fcn.00409a90
mov eax, dword [esp + 0x224]
add ebp, 1
cmp ebp, eax
jb 0x408b5f
mov esi, dword [esp + 0x220]
lea edx, [ebx - 1]
test ebx, ebx
je 0x408e00
mov ecx, dword [esp + 0x218]
mov eax, dword [ecx + edx*4]
test eax, eax
jne 0x409627
add edx, 0xffffffff
cmp edx, 0xffffffff
jne 0x408ded
xor edx, edx
mov eax, dword [esp + 0x218]
mov eax, dword [eax + edx*4 - 4]
mov ebp, 0x80000000
test ebp, eax
jne 0x408e1c
shr ebp, 1
test ebp, ebp
jne 0x408e12
test edx, edx
je 0x40927d
mov dword [esp + 0x220], esi
mov eax, 1
mov dword [esp + 0x25c], eax
xor edi, edi
mov dword [esp + 0x234], edi
mov ecx, dword [esp + 0x24c]
shl ecx, 2
mov dword [esp + 0x22c], ecx
mov ecx, ebx
shl ecx, 2
mov esi, edi
mov dword [esp + 0x21c], ecx
mov ebx, edx
test esi, esi
jne 0x408f25
mov ecx, dword [esp + 0x218]
test dword [ecx + ebx*4 - 4], ebp
je 0x408f39
mov eax, dword [esp + 0x230]
mov edi, ebp
mov esi, ebx
test eax, eax
je 0x4091f3
mov edx, ecx
mov dword [esp + 0x238], ebp
mov dword [esp + 0x254], ebx
mov eax, 1
mov dword [esp + 0x234], eax
xor ecx, ecx
add ecx, 1
cmp edi, 1
jne 0x408ebd
add esi, 0xffffffff
mov edi, 0x80000000
jmp 0x408ebf
shr edi, 1
add eax, eax
test esi, esi
je 0x408ed6
mov ebx, edi
and ebx, dword [edx + esi*4 - 4]
mov ebp, eax
or ebp, 1
test ebx, ebx
je 0x408ed6
mov eax, ebp
mov ebx, dword [esp + 0x230]
cmp ecx, ebx
jb 0x408eab
mov ebp, dword [esp + 0x238]
mov ebx, dword [esp + 0x254]
mov dword [esp + 0x234], eax
mov edi, dword [esp + 0x230]
test edi, edi
je 0x408f15
test al, 1
jne 0x408f0e
add edi, 0xffffffff
shr eax, 1
test edi, edi
jne 0x408f01
mov dword [esp + 0x234], eax
shr eax, 1
mov dword [esp + 0x234], eax
mov esi, 1
jmp 0x408f30
test edi, edi
jbe 0x408fbb
add edi, 0xffffffff
cmp edi, 1
jb 0x408fbb
cmp ebp, 1
jne 0x408f48
add ebx, 0xffffffff
mov ebp, 0x80000000
jmp 0x408f4a
shr ebp, 1
test ebx, ebx
je 0x409204
mov ecx, dword [esp + 0x25c]
test ecx, ecx
jne 0x408e61
mov eax, dword [esp + 0x250]
mov edx, dword [esp + 0x23c]
mov ecx, dword [esp + 0x290]
call fcn.004096e0
mov ecx, dword [esp + 0x24c]
mov eax, dword [esp + 0x228]
mov edx, dword [esp + 0x23c]
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x28c]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x290]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x250]
call fcn.00409a90
jmp 0x408e61
mov eax, dword [esp + 0x25c]
test eax, eax
jne 0x40959d
mov eax, dword [esp + 0x234]
mov ecx, dword [esp + eax*4 + 0x18]
mov esi, dword [esp + 0x24c]
mov dword [esp + 0x240], ecx
test esi, esi
je 0x40900e
mov eax, esi
cmp eax, 0x320
je 0x409521
mov eax, dword [esp + 0x22c]
push eax
push 0
mov ecx, dword [esp + 0x258]
push ecx
call fcn.0041d778
add esp, 0xc
mov eax, dword [esp + 0x290]
test eax, eax
jbe 0x409559
mov eax, dword [esp + 0x23c]
mov ecx, dword [eax]
test ecx, ecx
je 0x409056
mov esi, dword [esp + 0x290]
mov eax, dword [esp + 0x250]
mov edi, dword [esp + 0x290]
mov dword [esp + 0x238], ebp
xor ecx, ecx
mov dword [esp + 0x254], ebx
lea edx, [eax + esi*4]
xor eax, eax
jmp 0x4090ad
mov esi, dword [esp + 0x290]
mov eax, dword [esp + 0x250]
mov edi, dword [esp + 0x290]
mov dword [esp + 0x238], ebp
xor ecx, ecx
mov dword [esp + 0x254], ebx
lea edx, [eax + esi*4]
xor eax, eax
mov dword [eax + edx], 0
add ecx, 1
cmp ecx, edi
jae 0x40954b
mov ebx, dword [esp + 0x23c]
mov eax, ecx
shl eax, 2
mov ebp, dword [ebx + eax]
test ebp, ebp
je 0x409080
test edi, edi
jbe 0x409544
mov esi, dword [esp + 0x250]
mov dword [esp + 0x244], eax
mov dword [esp + 0x264], edx
xor ebx, ebx
mov dword [esp + 0x260], ecx
lea esi, [esi + eax]
mov ecx, ebx
mov dword [esp + 0x268], esi
mov eax, dword [esp + 0x240]
mov edx, dword [esp + 0x23c]
mov ebp, dword [esp + 0x244]
mov esi, dword [eax + ecx*4]
mov eax, dword [ebp + edx]
movzx edi, ax
mov dword [esp + 0x248], ecx
movzx ecx, si
shr esi, 0x10
shr eax, 0x10
mov ebp, ecx
imul ebp, edi
imul ecx, eax
imul edi, esi
imul eax, esi
add ecx, edi
cmp ecx, edi
mov edi, 0
adc edi, 0
mov edx, ecx
shr edx, 0x10
shl edi, 0x10
add edx, edi
shl ecx, 0x10
add ebp, ecx
cmp ebp, ecx
adc edx, 0
mov ecx, dword [esp + 0x248]
add ebp, ebx
lea esi, [edx + eax]
cmp ebp, ebx
jae 0x409148
lea esi, [edx + eax + 1]
mov eax, dword [esp + 0x268]
mov edx, dword [eax + ecx*4]
add ebp, edx
cmp ebp, edx
jae 0x40915b
add esi, 1
mov ebx, eax
mov eax, dword [esp + 0x290]
mov dword [ebx + ecx*4], ebp
mov ebx, esi
add ecx, 1
cmp ecx, eax
jb 0x4090d7
mov eax, dword [esp + 0x244]
mov edx, dword [esp + 0x264]
mov ecx, dword [esp + 0x260]
mov edi, dword [esp + 0x290]
mov dword [eax + edx], ebx
jmp 0x409087
xor ecx, ecx
mov edi, dword [esi + ecx*4]
mov dword [edx + ecx*4], edi
add ecx, 1
cmp ecx, ebx
jb 0x40919a
mov ecx, dword [esp + 0x24c]
mov esi, edx
test ecx, ecx
jne 0x408c01
jmp 0x408c2b
xor edx, edx
jmp 0x408d91
mov edx, dword [esp + 0x234]
mov ebp, dword [esp + 0x238]
jmp 0x408d99
mov edi, dword [esp + 0x250]
lea ecx, [edi + ebx*8]
mov dword [edi], 0
add edi, 4
cmp edi, ecx
jb 0x4091e1
jmp 0x408c2b
mov eax, 1
mov dword [esp + 0x234], eax
jmp 0x408ef6
mov ebx, dword [esp + 0x290]
mov eax, esi
mov esi, dword [esp + 0x220]
test eax, eax
je 0x40927d
mov eax, dword [esp + 0x25c]
test eax, eax
jne 0x40948e
mov eax, dword [esp + 0x250]
mov ebp, dword [esp + 0x234]
mov edx, dword [esp + ebp*4 + 0x18]
mov ecx, dword [esp + 0x23c]
mov dword [esp + 0xc], ebx
call fcn.0040991c
mov ebp, dword [esp + 0x24c]
mov edi, dword [esp + 0x28c]
mov eax, dword [esp + 0x228]
mov edx, dword [esp + 0x23c]
mov ecx, dword [esp + 0x250]
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], ebx
call fcn.00409a90
test ebx, ebx
jbe 0x4092c7
cmp ebx, 0x320
jbe 0x409506
mov edi, dword [esp + 0x23c]
mov ecx, ebx
shl ecx, 2
mov ebp, esi
sub ebp, edi
xor edx, edx
cmp ebp, ecx
setg dl
sub edi, esi
xor eax, eax
cmp edi, ecx
setg al
or edx, eax
je 0x409506
push ecx
mov eax, dword [esp + 0x240]
push eax
push esi
call fcn.0041d7d0
add esp, 0xc
mov eax, dword [esp + 0x23c]
test eax, eax
je 0x40931c
mov eax, dword [esp + 0x24c]
test eax, eax
je 0x4092f7
mov eax, dword [esp + 0x23c]
mov edx, eax
lea eax, [eax + ebx*8]
mov dword [eax - 4], 0
add eax, 0xfffffffc
cmp edx, eax
jne 0x4092e9
mov ecx, dword [esp + 0x23c]
mov eax, dword [ecx]
mov dword [esp + 0x218], eax
mov edx, dword [esp + 0x218]
test ecx, ecx
je 0x40931c
mov eax, ecx
push eax
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
mov eax, dword [esp + 0x258]
test eax, eax
je 0x409371
mov eax, dword [esp + 0x24c]
test eax, eax
je 0x40934c
mov eax, dword [esp + 0x258]
mov edx, eax
lea eax, [eax + ebx*8]
mov dword [eax - 4], 0
add eax, 0xfffffffc
cmp edx, eax
jne 0x40933e
mov ecx, dword [esp + 0x258]
mov eax, dword [ecx]
mov dword [esp + 0x218], eax
mov edx, dword [esp + 0x218]
test ecx, ecx
je 0x409371
mov eax, ecx
push eax
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
mov eax, dword [esp + 0x250]
test eax, eax
je 0x4093c6
mov eax, dword [esp + 0x24c]
test eax, eax
je 0x4093a1
mov eax, dword [esp + 0x250]
mov edx, eax
lea eax, [eax + ebx*8]
mov dword [eax - 4], 0
add eax, 0xfffffffc
cmp edx, eax
jne 0x409393
mov ecx, dword [esp + 0x250]
mov eax, dword [ecx]
mov dword [esp + 0x218], eax
mov edx, dword [esp + 0x218]
test ecx, ecx
je 0x4093c6
mov eax, ecx
push eax
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
mov eax, dword [esp + 0x228]
test eax, eax
je 0x40941b
mov eax, dword [esp + 0x24c]
test eax, eax
je 0x4093f6
mov eax, dword [esp + 0x228]
mov edx, eax
lea eax, [eax + ebx*8]
mov dword [eax - 4], 0
add eax, 0xfffffffc
cmp edx, eax
jne 0x4093e8
mov ecx, dword [esp + 0x228]
mov eax, dword [ecx]
mov dword [esp + 0x218], eax
mov edx, dword [esp + 0x218]
test ecx, ecx
je 0x40941b
mov eax, ecx
push eax
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
mov eax, dword [esp + 0x224]
cmp eax, 1
jbe 0x409481
mov esi, eax
mov edi, dword [esp + 0x24c]
mov ebp, 1
mov edx, dword [esp + ebp*4 + 0x18]
add ebp, 1
test edx, edx
je 0x409465
test edi, edi
je 0x409455
lea eax, [edx + ebx*8]
mov dword [eax - 4], 0
add eax, 0xfffffffc
cmp edx, eax
jne 0x409447
mov eax, dword [edx]
mov dword [esp + 0x218], eax
mov edx, dword [esp + 0x218]
mov eax, dword [esp + ebp*4 + 0x14]
test eax, eax
je 0x40947d
push eax
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
mov dword [esp + ebp*4 + 0x14], 0
cmp ebp, esi
jb 0x409435
xor eax, eax
add esp, 0x26c
pop ebx
pop ebp
pop esi
pop edi
ret
mov eax, dword [esp + 0x234]
mov ecx, dword [esp + eax*4 + 0x18]
test ebx, ebx
jbe 0x4092c7
cmp ebx, 0x320
jbe 0x4094ea
mov eax, dword [esp + 0x23c]
mov ebp, dword [esp + 0x21c]
mov edi, eax
sub edi, ecx
xor edx, edx
cmp edi, ebp
setg dl
mov edi, ecx
sub edi, eax
xor eax, eax
cmp edi, ebp
setg al
or edx, eax
je 0x4094ea
mov eax, ebp
push eax
push ecx
mov edx, dword [esp + 0x244]
push edx
call fcn.0041d7d0
add esp, 0xc
jmp 0x409281
mov ebp, dword [esp + 0x23c]
xor eax, eax
mov edx, dword [ecx + eax*4]
mov dword [ebp + eax*4], edx
add eax, 1
cmp eax, ebx
jb 0x4094f3
jmp 0x40927d
mov ecx, dword [esp + 0x23c]
xor eax, eax
mov edx, dword [ecx + eax*4]
mov dword [esi + eax*4], edx
add eax, 1
cmp eax, ebx
jb 0x40950f
jmp 0x4092c7
mov ecx, dword [esp + 0x250]
mov eax, dword [esp + 0x290]
lea eax, [ecx + eax*8]
mov dword [ecx], 0
add ecx, 4
cmp ecx, eax
jb 0x409532
jmp 0x40900e
xor ebx, ebx
jmp 0x409190
mov ebp, dword [esp + 0x238]
mov ebx, dword [esp + 0x254]
mov esi, dword [esp + 0x24c]
mov edi, dword [esp + 0x28c]
mov eax, dword [esp + 0x290]
mov edx, dword [esp + 0x23c]
mov ecx, dword [esp + 0x250]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x228]
call fcn.00409a90
xor esi, esi
xor edi, edi
jmp 0x408f39
mov ecx, dword [esp + 0x234]
mov ecx, dword [esp + ecx*4 + 0x18]
mov eax, dword [esp + 0x290]
test eax, eax
jbe 0x4095fd
mov eax, dword [esp + 0x290]
cmp eax, 0x320
jbe 0x409608
mov eax, dword [esp + 0x23c]
mov esi, dword [esp + 0x21c]
mov edi, eax
sub edi, ecx
xor edx, edx
cmp edi, esi
setg dl
mov edi, ecx
sub edi, eax
xor eax, eax
cmp edi, esi
setg al
or edx, eax
je 0x409608
mov eax, esi
push eax
push ecx
mov ecx, dword [esp + 0x244]
push ecx
call fcn.0041d7d0
add esp, 0xc
xor eax, eax
mov dword [esp + 0x25c], eax
jmp 0x409594
mov edi, dword [esp + 0x23c]
mov edx, dword [esp + 0x290]
xor eax, eax
mov esi, dword [ecx + eax*4]
mov dword [edi + eax*4], esi
add eax, 1
cmp eax, edx
jb 0x409618
jmp 0x4095fd
add edx, 1
jmp 0x408e02
push 0x10
push 0x4e3a0c
push 0x4e3a1c
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
call dword [sym.imp.MSVCRT.dll_exit]
pop ecx
jmp 0x408abe
mov dword [esp + 0x230], edx
mov eax, edx
cmp eax, 1
ja 0x408a8f
mov edi, dword [esp + 0x28c]
mov ecx, dword [esp + 0x218]
mov dword [esp + 0xc], edi
mov eax, esi
mov edx, ebp
mov dword [esp + 0x10], ebx
call fcn.0040aae4
xor eax, eax
add esp, 0x26c
pop ebx
pop ebp
pop esi
pop edi
ret