Function at 0x40b060
Capabilities:
Terminate process

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x44
mov ebx, dword [esp + 0x68]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], eax
lea eax, [ebx + ebx]
mov dword [esp + 0x28], eax
cmp eax, 1
jae 0x40b088
mov eax, 1
mov dword [esp + 0x20], eax
push 4
push eax
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov dword [esp + 0x24], eax
test eax, eax
je 0x40b3d3
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40b0ca
cmp eax, 0x320
je 0x40b1d9
shl eax, 2
push eax
push 0
mov edx, dword [esp + 0x2c]
push edx
call fcn.0041d778
add esp, 0xc
test ebx, ebx
jbe 0x40b1f6
mov eax, dword [esp + 0x34]
mov edx, dword [eax]
test edx, edx
je 0x40b0e9
mov eax, dword [esp + 0x24]
xor edi, edi
lea esi, [eax + ebx*4]
xor ebp, ebp
jmp 0x40b11f
mov eax, dword [esp + 0x24]
xor edi, edi
lea esi, [eax + ebx*4]
xor ebp, ebp
mov dword [ebp + esi], 0
add edi, 1
cmp edi, ebx
jae 0x40b1f6
mov eax, dword [esp + 0x34]
mov ebp, edi
shl ebp, 2
mov edx, dword [eax + ebp]
test edx, edx
je 0x40b0f4
test ebx, ebx
jbe 0x40b1f2
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x38], ebp
mov dword [esp + 0x18], esi
xor eax, eax
mov dword [esp + 0x1c], edi
lea ecx, [ecx + ebp]
mov esi, eax
mov dword [esp + 0x3c], ecx
mov ebx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
mov ebp, dword [esp + 0x38]
mov ecx, dword [ebx + esi*4]
mov ebx, dword [edx + ebp]
movzx edi, bx
mov dword [esp + 0x40], esi
movzx esi, cx
shr ecx, 0x10
shr ebx, 0x10
mov edx, esi
imul edx, edi
imul esi, ebx
imul edi, ecx
imul ebx, ecx
add esi, edi
cmp esi, edi
mov edi, 0
adc edi, 0
mov ebp, esi
shr ebp, 0x10
shl edi, 0x10
add ebp, edi
shl esi, 0x10
add edx, esi
cmp edx, esi
adc ebp, 0
mov esi, dword [esp + 0x40]
add edx, eax
lea ecx, [ebp + ebx]
cmp edx, eax
jae 0x40b19c
lea ecx, [ebp + ebx + 1]
mov eax, dword [esp + 0x3c]
mov ebx, dword [eax + esi*4]
add edx, ebx
cmp edx, ebx
jae 0x40b1ac
add ecx, 1
mov ebx, dword [esp + 0x68]
mov dword [eax + esi*4], edx
mov eax, ecx
add esi, 1
cmp esi, ebx
jb 0x40b13a
mov ebp, dword [esp + 0x38]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x68]
mov dword [ebp + esi], eax
jmp 0x40b0fc
mov edx, dword [esp + 0x24]
lea eax, [edx + ebx*8]
mov dword [edx], 0
add edx, 4
cmp edx, eax
jb 0x40b1e0
jmp 0x40b0ca
xor eax, eax
jmp 0x40b1d0
mov ebp, dword [esp + 0x28]
push 4
mov eax, dword [esp + 0x24]
cmp ebp, ebx
push eax
ja 0x40b207
mov ebp, ebx
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov esi, eax
test esi, esi
je 0x40b3b1
push 4
cmp ebp, 1
jae 0x40b226
mov ebp, 1
push ebp
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov ebp, eax
test ebp, ebp
je 0x40b38f
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0xc], edi
mov edx, ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ebx
mov eax, esi
call fcn.00409a90
test ebx, ebx
jbe 0x40b2c1
cmp ebx, 0x320
jbe 0x40b376
mov dword [esp + 0x40], esi
mov esi, dword [esp + 0x2c]
mov edi, ebx
shl edi, 2
mov edx, esi
mov dword [esp + 0x3c], edi
sub edx, ebp
xor eax, eax
mov dword [esp + 0x38], eax
cmp edx, edi
mov eax, ebp
mov edx, dword [esp + 0x38]
setg dl
mov dword [esp + 0x38], edx
sub eax, esi
mov esi, dword [esp + 0x40]
xor ecx, ecx
cmp eax, edi
mov dword [esp + 0x34], ecx
mov eax, ecx
setg al
or edx, eax
je 0x40b376
mov eax, edi
push eax
push ebp
mov edx, dword [esp + 0x34]
push edx
call fcn.0041d7d0
add esp, 0xc
test ebp, ebp
je 0x40b2f6
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40b2df
lea eax, [ebp + ebx*8]
mov dword [eax - 4], 0
add eax, 0xfffffffc
cmp ebp, eax
jne 0x40b2d1
mov eax, dword [ebp]
mov dword [esp + 0x18], eax
mov edx, dword [esp + 0x18]
test ebp, ebp
je 0x40b2f6
push ebp
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
test esi, esi
je 0x40b329
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40b313
lea eax, [esi + ebx*8]
mov dword [eax - 4], 0
add eax, 0xfffffffc
cmp esi, eax
jne 0x40b305
mov eax, dword [esi]
mov dword [esp + 0x18], eax
mov edx, dword [esp + 0x18]
test esi, esi
je 0x40b329
push esi
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
mov eax, dword [esp + 0x24]
test eax, eax
je 0x40b36c
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40b350
mov eax, dword [esp + 0x24]
mov edx, eax
lea eax, [eax + ebx*8]
mov dword [eax - 4], 0
add eax, 0xfffffffc
cmp edx, eax
jne 0x40b342
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx]
mov dword [esp + 0x18], eax
mov edx, dword [esp + 0x18]
test ecx, ecx
je 0x40b36c
mov eax, ecx
push eax
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
xor eax, eax
add esp, 0x44
pop ebx
pop ebp
pop esi
pop edi
ret
mov ecx, dword [esp + 0x2c]
xor eax, eax
mov edx, dword [ebp + eax*4]
mov dword [ecx + eax*4], edx
add eax, 1
cmp eax, ebx
jb 0x40b37c
jmp 0x40b2c1
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 0x40b23a
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 0x40b21a
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 0x40b0a4