Function at 0x40b40d
Capabilities:
Print debug messages

Disassembly:
mov eax, dword [ebp + 0x10]
inc eax
mov dword [ebp - 0x48], 0xffff8000
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x4c], eax
dec eax
mov dword [ebp - 0x44], eax
jmp 0x40b475
cmp dword [ebp - 0x5c], eax
jne 0x40b508
jmp 0x40b53c
mov ecx, dword [edi + 0x1c]
mov edx, dword [edi + 0x20]
add eax, eax
movzx ecx, word [eax + ecx]
movzx eax, word [eax + edx]
mov dword [ebp - 0x10], eax
sub eax, ecx
inc eax
mov dword [ebp - 0x14], ecx
cmp ax, 2
jle 0x40b57a
mov edx, dword [edi + 0x14]
movsx eax, cx
mov ebx, dword [edx + eax*4]
mov ecx, dword [edi + 0x10]
mov esi, dword [ecx + eax*4]
mov edx, dword [edi + 0x18]
movzx eax, byte [edx + eax]
add esi, esi
add ebx, ebx
mov dword [ebp - 0x38], eax
test eax, eax
je 0x412378
movzx eax, word [ebp - 0x14]
mov dword [ebp - 8], eax
jmp 0x4092c1
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x30], edx
jmp 0x40aa3d
cmp ebx, ecx
jne 0x40aa16
jmp 0x4092a8
mov ecx, dword [ebp - 0x54]
jmp 0x40aa46
mov dword [ebp - 0x20], eax
jmp 0x40aa24
movsx eax, word [ebp - 0x14]
movzx eax, ax
jmp 0x409262
mov dword [ebp - 0x1c], ecx
jmp 0x40aa2d
mov dword [ebp - 0x18], 2
jmp 0x40b55d
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
inc ecx
mov dword [ebp - 0x50], eax
dec eax
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], 0xffff8000
jmp 0x40b475
test al, al
je 0x4092a8
push dword [ebp - 0x54]
push dword [ebp - 0x58]
push ebx
push esi
push dword [ebp - 0x64]
push dword [ebp - 0x68]
push dword [ebp - 0x44]
push dword [ebp - 0x48]
push dword [ebp - 0x4c]
push dword [ebp - 0x50]
call fcn.0040beb8
add dword [ebp - 4], eax
jmp 0x4092a8
mov ecx, dword [edi + 0x10]
mov edx, dword [edi + 0x18]
mov dword [ebp - 8], eax
movsx eax, ax
mov ecx, dword [ecx + eax*4]
movzx edx, byte [eax + edx]
add ecx, ecx
mov dword [ebp - 0x58], ecx
mov ecx, dword [edi + 0x14]
mov ecx, dword [ecx + eax*4]
mov eax, dword [ebp - 0x38]
add eax, eax
add ecx, ecx
or eax, edx
sub eax, 0
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x34], edx
je 0x409490
dec eax
je 0x4092ce
dec eax
jne 0x40aa04
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x64], ebx
mov eax, dword [ebp - 0x34]
mov esi, dword [ebp - 0x58]
mov ebx, dword [ebp - 0x54]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 8]
cmp ax, word [ebp - 0x14]
je 0x40b57a
cmp ax, word [ebp - 0x10]
je 0x406172
inc eax
jmp 0x409262
mov eax, dword [ebp - 0x68]
cmp eax, dword [ebp - 0x58]
je 0x4125fc
push ecx
push dword [ebp - 0x58]
push ebx
push esi
push dword [ebp - 0x64]
push eax
push dword [ebp - 0x4c]
push dword [ebp - 0x50]
push dword [ebp + 0xc]
call fcn.00409197
jmp 0x40923a
mov eax, dword [ebp - 0x58]
add eax, esi
add ecx, ebx
sar eax, 1
sar ecx, 1
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], ecx
cmp dword [ebp - 0x68], eax
je 0x4125ee
push ecx
push eax
push ebx
push esi
push dword [ebp - 0x64]
push dword [ebp - 0x68]
push dword [ebp - 0x4c]
push dword [ebp - 0x50]
push dword [ebp + 0xc]
call fcn.00409197
test al, al
je 0x4094e8
push dword [ebp - 0x24]
push dword [ebp - 0x28]
push ebx
push esi
push dword [ebp - 0x64]
push dword [ebp - 0x68]
push dword [ebp - 0x44]
push dword [ebp - 0x48]
push dword [ebp - 0x4c]
push dword [ebp - 0x50]
call fcn.0040beb8
add dword [ebp - 4], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x64], eax
jmp 0x4092a8
dec eax
jne 0x4092a8
mov eax, dword [ebp - 0x58]
cmp esi, eax
je 0x406155
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], ebx
cmp eax, esi
jl 0x40616a
cmp ecx, dword [ebp - 0x1c]
jl 0x40617e
mov edx, esi
mov dword [ebp - 0x30], edx
mov ecx, ebx
cmp dword [ebp - 0x58], esi
jg 0x40614a
cmp dword [ebp - 0x54], ecx
jg 0x406162
movsx eax, word [ebp + 0xc]
sub eax, 0
jne 0x40aa8e
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x4c]
jg 0x4092a8
cmp ecx, dword [ebp - 0x4c]
jl 0x4092a8
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x50]
jg 0x4092a8
push dword [ebp - 0x54]
push dword [ebp - 0x58]
push ebx
push esi
push dword [ebp - 0x44]
push dword [ebp - 0x48]
push dword [ebp - 0x4c]
push dword [ebp - 0x50]
call fcn.0040d743
jmp 0x40925d
dec eax
je 0x42dc0f
dec eax
je 0x40aabf
dec eax
jne 0x42dbff
mov eax, dword [ebp - 0x50]
cmp dword [ebp - 0x20], eax
jg 0x4092a8
cmp dword [ebp - 0x30], eax
jl 0x4092a8
cmp ecx, dword [ebp - 0x4c]
jl 0x4092a8
jmp 0x40aa70
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x50]
jg 0x4092a8
cmp edx, dword [ebp - 0x50]
jl 0x4092a8
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x4c]
jle 0x40aa70
jmp 0x4092a8
xor edx, edx
test eax, eax
setg dl
movzx eax, dx
mov dword [ebp - 0xc], eax
jmp 0x40b527
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x68
mov ecx, dword [edi + 0x1c]
and dword [ebp - 0xc], 0
push ebx
push esi
mov esi, eax
mov eax, dword [ebp + 8]
add eax, eax
movzx ebx, word [eax + ecx]
mov ecx, dword [edi + 0x20]
mov ax, word [ecx + eax]
sub ax, bx
inc ax
movzx eax, ax
mov dword [ebp - 0x10], eax
movsx eax, word [ebp + 0xc]
sub eax, 0
je 0x4060cb
dec eax
je 0x42dbd9
dec eax
je 0x4065ed
dec eax
jne 0x42dbc9
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
dec ecx
mov dword [ebp - 0x50], eax
dec eax
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], 0x7fff
movsx ecx, word [ebp - 0x10]
sub esi, ebx
movzx eax, si
movsx esi, ax
mov dword [ebp - 8], eax
lea eax, [ecx + esi - 1]
cdq
idiv ecx
and dword [ebp - 0x18], 0
and dword [ebp - 4], 0
mov dword [ebp - 0x14], ecx
mov ecx, dword [edi + 0x10]
movzx eax, dx
cwde
movsx edx, bx
add eax, edx
mov ebx, dword [ecx + eax*4]
mov dword [ebp - 0x1c], edx
add edx, esi
mov esi, dword [ecx + edx*4]
mov dword [ebp - 0x60], esi
mov esi, dword [edi + 0x14]
mov eax, dword [esi + eax*4]
mov dword [ebp - 0x64], eax
mov eax, dword [esi + edx*4]
mov edx, dword [ebp - 0x60]
mov dword [ebp - 0x5c], eax
sub eax, dword [ebp - 0x64]
sub edx, ebx
mov dword [ebp - 0x40], edx
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x3c], eax
xor eax, eax
cmp ax, dx
jge 0x40b55d
mov eax, dword [ebp - 8]
cmp word [ebp - 0xc], 0
jne 0x40b54c
cwde
inc eax
cdq
idiv dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
add eax, edx
mov ebx, dword [ecx + eax*4]
mov eax, dword [esi + eax*4]
mov dword [ebp - 8], edx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x60], ebx
je 0x4060e8
sub ebx, dword [ebp - 0x60]
sub eax, dword [ebp - 0x5c]
mov edx, ebx
imul edx, dword [ebp - 0x3c]
mov dword [ebp - 0x2c], eax
imul eax, dword [ebp - 0x40]
sub eax, edx
jns 0x40b3fb
or dword [ebp - 0xc], 0xffffffff
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], eax
inc dword [ebp - 4]
mov edx, dword [ebp - 0x10]
movzx eax, word [ebp - 8]
cmp word [ebp - 4], dx
jl 0x40b4de
cmp word [ebp - 4], dx
jge 0x40b55d
cmp word [ebp - 0xc], 0
jg 0x406186
and dword [ebp - 4], 0
and dword [ebp - 0xc], 0
xor eax, eax
cmp ax, word [edi + 0x28]
jge 0x40b583
movsx eax, word [ebp - 0xc]
cmp eax, dword [ebp + 8]
jne 0x4060f6
inc dword [ebp - 0xc]
mov ax, word [ebp - 0xc]
jmp 0x40b567
mov eax, dword [ebp - 4]
add eax, eax
not eax
and eax, 2
sub eax, dword [ebp - 0x18]
pop esi
neg eax
sbb eax, eax
inc eax
pop ebx
leave
ret 0x10
movsx eax, word [ebp - 0x10]
mov ecx, dword [ecx + eax*4]
add ecx, ecx
mov dword [ebp - 0x68], ecx
mov ecx, dword [edi + 0x14]
mov eax, dword [ecx + eax*4]
movsx ecx, word [ebp - 0x10]
movzx ecx, byte [ecx + edx]
add eax, eax
mov dword [ebp - 0x64], eax
test ecx, ecx
jne 0x40613e
jmp 0x42dbe9
cmp dword [ebp - 0x64], ecx
jne 0x4094aa
jmp 0x4094e8
cmp dword [ebp - 0x64], ecx
jne 0x4092da
jmp 0x4092a8
push 0x42dc5c
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x40b475
mov eax, dword [ebp + 0x10]
dec eax
mov dword [ebp - 0x48], 0x7fff
jmp 0x4060d6
mov ecx, dword [ebp - 0x68]
add ecx, esi
add eax, ebx
sar ecx, 1
sar eax, 1
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x64], eax
jmp 0x40613e
push 0x42dc2c
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x40aa70
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x4c]
jg 0x4092a8
cmp ecx, dword [ebp - 0x4c]
jl 0x4092a8
cmp edx, dword [ebp - 0x50]
jmp 0x40aab7