Function at 0x40ad31
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov edx, dword [esi + 0x18]
mov ecx, dword [esi + 0x24]
mov eax, edx
sub eax, dword [ecx]
sub esp, 0x14
sar eax, 2
test eax, eax
js 0x41475d
cmp eax, 1
jb 0x42ef6e
lea eax, [edx - 4]
mov dword [esi + 0x18], eax
mov edx, eax
sub edx, dword [ecx]
push ebx
mov ebx, dword [eax]
sar edx, 2
add ebx, ebx
test edx, edx
js 0x41475d
test ebx, ebx
js 0x41475d
cmp ebx, edx
ja 0x42ef7d
mov edx, ebx
shl edx, 2
sub eax, edx
mov dword [esi + 0x18], eax
cmp byte [ecx + 0x120], 0
push edi
movzx edi, word [ecx + 0x10]
je 0x42ef8c
movsx eax, word [ebp + 0x10]
sub edi, eax
cmp edi, 0xf
ja 0x40ade6
and dword [ebp + 0x10], 0
mov eax, ebx
sar eax, 1
shl edi, 4
and eax, 0xfffffffe
mov dword [ebp - 4], edi
cmp eax, 2
jg 0x4143bd
cmp dword [ebp + 0x10], ebx
jge 0x40ade6
mov ecx, dword [ebp + 0x10]
mov eax, dword [esi + 0x18]
mov eax, dword [eax + ecx*4]
mov ecx, eax
and ecx, 0xfffffff0
cmp ecx, dword [ebp - 4]
je 0x413aaa
jg 0x40ade6
add dword [ebp + 0x10], 2
jmp 0x40adc2
mov eax, dword [ebp + 8]
pop edi
pop ebx
leave
ret 0x10
mov edi, dword [ebp + 0xc]
and eax, 0xf
xor ecx, ecx
cmp eax, 8
setl cl
add ecx, 7
sub eax, ecx
mov cl, byte [ebp + 0x14]
shl eax, 6
sar eax, cl
mov dword [ebp - 0x10], eax
cmp edi, dword [esi + 0x40]
jne 0x41472d
mov ecx, dword [esi]
mov eax, dword [esi + 0x20]
sub eax, ecx
neg eax
sbb eax, eax
and eax, 4
mov dword [ebp - 8], eax
movsx eax, word [ecx + 0x28]
mov ecx, dword [ecx + 0x20]
movzx eax, word [ecx + eax*2 - 2]
push eax
lea edi, [ebp - 0x14]
lea eax, [ebp - 8]
mov dword [ebp - 0xc], 1
call fcn.004130d7
and dword [ebp - 8], 0
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0xc]
push ecx
call fcn.00408218
mov ecx, dword [ebp + 0x10]
mov eax, dword [esi + 0x18]
lea eax, [eax + ecx*4 + 4]
mov ecx, dword [ebp - 8]
cmp ecx, dword [eax]
jle 0x414771
mov ecx, dword [eax]
mov dword [ebp - 8], ecx
test ecx, ecx
js 0x414771
mov edi, dword [ebp + 0xc]
cmp edi, dword [esi + 0x58]
je 0x413b9c
mov ecx, dword [esi + 0x24]
movzx edx, word [ecx + 0x160]
test dl, 1
je 0x413b9c
test byte [ecx + 0x6c], 4
jne 0x413b9c
test dl, 4
mov edx, 0x4000
jne 0x414762
cmp word [esi + 0xe], dx
jne 0x40ade0
cmp word [esi + 0xc], 0
jne 0x40ade0
cmp byte [ecx + 0x121], 0
jne 0x413b9c
mov edx, dword [esi]
movsx eax, word [eax]
mov edx, dword [edx + 0x24]
test byte [eax + edx], 2
je 0x40ade0
test byte [ecx + 0x162], 2
jne 0x40ade0
push dword [ebp - 0x10]
push dword [ebp - 8]
push dword [esi]
push esi
call edi
jmp 0x40ade0
mov edx, dword [esi + 0x18]
mov ecx, dword [ebp + 0x10]
add ecx, eax
mov edi, dword [edx + ecx*4]
and edi, 0xfffffff0
cmp edi, dword [ebp - 4]
jl 0x4143e0
sar eax, 1
and eax, 0xfffffffe
cmp eax, 2
jle 0x40adc2
jmp 0x4143c0
mov dword [ebp + 0x10], ecx
jmp 0x4143d0
cmp edi, dword [esi + 0x58]
jne 0x42efa1
mov ecx, dword [ebp + 0x10]
mov eax, dword [esi + 0x18]
mov edx, dword [esi + 0x24]
movzx edx, word [edx + 0x128]
lea eax, [eax + ecx*4 + 4]
mov ecx, dword [eax]
mov dword [ebp - 8], ecx
cmp edx, ecx
jle 0x41477d
test ecx, ecx
jns 0x413b37
jmp 0x41477d
call fcn.004439d8
cmp word [esi + 0xc], dx
je 0x42efb1
jmp 0x40ade0
mov dword [esi + 0x64], 0x1112
jmp 0x42efe7
mov dword [esi + 0x64], 0x111b
jmp 0x42efe7
mov eax, dword [esi + 0x68]
mov dword [esi + 0x64], 0x1110
jmp 0x40adeb
mov eax, dword [esi + 0x68]
mov dword [esi + 0x64], 0x1110
jmp 0x40adea
push esi
call fcn.0044b4bd
push eax
mov eax, edi
call fcn.00406de3
mov edi, eax
jmp 0x40ad9d
push 0x42eff0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x414736
cmp word [esi + 0xe], 0
jne 0x40ade0
cmp byte [ecx + 0x121], 0
jne 0x413b9c
mov edx, dword [esi]
movsx eax, word [eax]
mov edx, dword [edx + 0x24]
test byte [eax + edx], 1
je 0x40ade0
test byte [ecx + 0x162], 1
jmp 0x413b96
mov eax, dword [esi + 0x68]
jmp 0x40ade9