Function at 0x10161470
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x660
mov edx, dword [esp + 0x678]
mov byte [esp + 0x10], 0
cmp byte [edx], 0
je 0x10161496
mov al, byte [edx + 0x8b]
test al, al
je 0x10161496
mov byte [esp + 0x10], 1
push ebx
push ebp
mov ebp, dword [esp + 0x67c]
push esi
mov esi, dword [esp + 0x674]
push edi
mov ecx, 0x2035
or eax, 0xffffffff
mov edi, ebp
rep stosd dword es:[edi], eax
mov byte [ebp + 0x80c0], 0
mov byte [ebp + 0x80c1], 0
mov byte [ebp + 0x80d2], 0
mov al, byte [esi + 0x7c]
cmp al, 6
jb 0x101614e5
mov al, byte [esi + 0xac]
cmp al, 0x16
je 0x101614de
cmp al, 0x17
jne 0x101614e5
mov byte [ebp + 0x80d2], 1
mov byte [ebp + 0x80d3], 0
mov al, byte [esi + 8]
and al, 0xc0
cmp al, 0x80
jne 0x10161522
mov al, byte [ebp + 0x80d2]
mov byte [ebp + 0x80d3], 3
test al, al
je 0x1016150d
mov byte [ebp + 0x80d3], 3
cmp byte [edx], 0
je 0x10161522
mov al, byte [edx + 0x9e]
test al, al
je 0x10161522
mov byte [ebp + 0x80d3], al
mov al, byte [esi + 0x7c]
mov edi, dword [esp + 0x690]
mov ebx, dword [esp + 0x680]
cmp al, 5
jne 0x10161553
push edx
push edi
push ebx
push ebp
lea ecx, [esp + 0x280]
push esi
push ecx
call fcn.10160390
mov edx, dword [esp + 0x6a0]
add esp, 0x18
mov ecx, dword [esp + 0x67c]
lea eax, [esp + 0x270]
push eax
push edi
push edx
mov edx, dword [esp + 0x680]
push ebp
push ebx
push ecx
push esi
push edx
call fcn.1015aae0
add esp, 0x20
cmp eax, 1
jne 0x10162084
xor eax, eax
xor edx, edx
mov al, byte [esi + 0xb]
mov dl, byte [esi + 9]
mov ecx, eax
mov eax, dword [esi + 0x70]
imul eax, ecx
imul eax, edx
mov dword [esp + 0x2c], 0
mov byte [esp + 0x13], 0
lea edi, [eax + eax]
push edi
call fcn.101d175d
mov ecx, edi
mov ebx, eax
mov edx, ecx
or eax, 0xffffffff
mov edi, ebx
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x1c], ebx
and ecx, 3
rep stosb byte es:[edi], al
mov ax, word [esi + 0x109]
test ax, ax
je 0x101615e6
mov cl, byte [esi + 8]
and cl, 0xc0
cmp cl, 0x80
jne 0x101615e6
mov byte [esp + 0x13], 1
xor edx, edx
and eax, 0xffff
mov dl, byte [esi + 0xb]
xor ecx, ecx
imul eax, edx
mov cl, byte [esi + 9]
imul eax, ecx
test eax, eax
jne 0x10161604
mov eax, 1
lea edi, [eax + eax]
push edi
call fcn.101d175d
mov edx, eax
mov ecx, edi
mov dword [esp + 0x18], edx
mov edi, edx
mov edx, ecx
or eax, 0xffffffff
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov al, byte [esp + 0x13]
test al, al
je 0x101616a8
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
push 1
push eax
mov eax, dword [esp + 0x684]
lea edx, [esp + 0xf4]
push ecx
mov ecx, dword [esp + 0x68c]
push edx
push ebp
push eax
push ecx
push esi
call fcn.10162120
mov edi, eax
add esp, 0x20
cmp edi, 1
je 0x10161688
mov edx, dword [esp + 0x14]
push edx
call fcn.101d1786
push ebx
call fcn.101d1786
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x67c]
push 0
push eax
mov eax, dword [esp + 0x688]
lea ecx, [esp + 0x58]
push ebx
push ecx
push ebp
push edx
push eax
jmp 0x10161712
mov al, byte [esi + 0x7c]
mov dword [esp + 0x3c], 0
cmp al, 5
je 0x101616bb
cmp al, 6
jb 0x101616f4
mov al, byte [esi + 0xf0]
test al, al
je 0x101616f4
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x67c]
push ecx
mov ecx, dword [esp + 0x684]
lea edx, [esp + 0x30]
push ebx
push edx
push ebp
push eax
push ecx
push esi
mov dword [esp + 0x58], 1
call fcn.101688c0
add esp, 0x1c
jmp 0x1016171b
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x67c]
push 0
push edx
mov edx, dword [esp + 0x688]
lea eax, [esp + 0x58]
push ebx
push eax
push ebp
push ecx
push edx
push esi
call fcn.10162120
add esp, 0x20
mov edi, eax
cmp edi, 1
je 0x10161742
push ebx
call fcn.101d1786
mov eax, dword [esp + 0x18]
push eax
call fcn.101d1786
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret
mov dl, byte [ebp + 0x80d2]
mov al, byte [esp + 0x13]
xor ecx, ecx
mov cl, byte [ebp + 0x80d3]
neg dl
sbb edx, edx
mov edi, ecx
and edx, 9
mov dword [esp + 0x30], edi
add edx, 9
test al, al
mov dword [esp + 0x28], edx
je 0x101617f4
lea eax, [esp + 0x24]
lea ecx, [esp + 0x1b]
push eax
lea edx, [esp + 0x1e]
push ecx
lea eax, [esp + 0x58]
push edx
push eax
push esi
call fcn.1015c300
add esp, 0x14
test eax, eax
jne 0x10161797
push ebx
jmp 0x10161d59
cmp dword [esp + 0x24], edi
ja 0x101617c0
push ebx
call fcn.101d1786
mov edx, dword [esp + 0x18]
push edx
call fcn.101d1786
add esp, 8
mov eax, 0x1f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x38]
sub edx, edi
lea ecx, [esp + 0x1b]
mov dword [esp + 0x24], edx
push eax
lea edx, [esp + 0x1e]
push ecx
lea eax, [esp + 0xf4]
push edx
push eax
push esi
call fcn.1015c300
add esp, 0x14
test eax, eax
jne 0x10161854
push ebx
jmp 0x10161d59
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x3c]
mov ecx, eax
test edx, edx
mov dword [esp + 0x24], ecx
jne 0x1016184a
lea edx, [esp + 0x24]
lea eax, [esp + 0x1b]
push edx
lea ecx, [esp + 0x1e]
push eax
lea edx, [esp + 0x58]
push ecx
push edx
push esi
call fcn.1015c300
add esp, 0x14
test eax, eax
jne 0x10161854
push ebx
call fcn.101d1786
mov eax, dword [esp + 0x18]
push eax
call fcn.101d1786
add esp, 8
mov eax, 0x1f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret
test eax, eax
jne 0x10161858
push ebx
jmp 0x10161d59
mov ecx, dword [esp + 0x24]
xor eax, eax
xor edx, edx
mov ax, word [esi + 0x22]
mov dl, byte [esi + 9]
mov dword [esp + 0x44], eax
xor eax, eax
mov al, byte [esi + 0xe]
mov dword [esp + 0x34], edx
mov dword [esp + 0x48], eax
mov al, byte [esi + 0xb]
mov edi, eax
mov al, byte [esi + 0x7c]
and edi, 0xff
imul edi, edx
shl edi, 1
cmp al, 5
mov dword [esp + 0x20], edi
je 0x10161893
cmp al, 6
jb 0x101618a9
mov al, byte [esi + 0xf0]
test al, al
je 0x101618a9
mov dword [esp + 0x20], 2
mov edi, dword [esp + 0x20]
mov bl, byte [esi + 0x7a]
test bl, bl
je 0x101618e8
and ebx, 0xff
mov al, byte [esp + 0x13]
test al, al
je 0x10161aa3
mov edx, dword [esp + 0x14]
lea eax, [esp + 0xec]
push edx
mov edx, dword [esp + 0x680]
lea ecx, [esp + 0x54]
push eax
push ecx
push ebp
push edx
push esi
call fcn.1015ba50
jmp 0x10161b5c
mov al, byte [ebp + 0x80d2]
test al, al
je 0x101618f9
mov ebx, 0x38
jmp 0x10161978
cmp edi, 2
jne 0x1016191b
cmp ecx, 0x1fe
mov ebx, 0x20
jb 0x10161980
cmp ecx, 0x21c
jae 0x10161978
lea ebx, [ecx - 0x1ee]
jmp 0x10161978
cmp edi, 4
jne 0x1016193d
cmp ecx, 0x1fe
mov ebx, 0x18
jb 0x10161980
cmp ecx, 0x216
jae 0x10161978
lea ebx, [ecx - 0x1ee]
jmp 0x10161978
mov eax, dword [esi + 0x68]
cmp eax, 0x2000
jb 0x1016194e
mov eax, 0x40
jmp 0x10161969
cmp eax, 0x1000
jb 0x10161964
mov eax, dword [esi + 0x6c]
cmp eax, 0x100
mov eax, 0x40
jae 0x10161969
mov eax, 0x80
xor edx, edx
div edi
mov ebx, eax
add ebx, 0xb
and ebx, 0xffff
cmp ecx, 0x1fe
jae 0x10161985
mov ebx, 0x10
mov al, byte [esi + 0x110]
test al, al
je 0x10161ae7
cmp byte [esi + 0xb], 1
jne 0x10161ae7
mov al, byte [esi + 0x7c]
test al, al
je 0x10161ae7
mov al, byte [esp + 0x13]
test al, al
jne 0x10161aef
mov eax, 0x400
xor edx, edx
div edi
mov ecx, eax
mov eax, dword [esp + 0x24]
mov edx, ecx
sub edx, ebx
lea eax, [edx + eax - 1]
xor edx, edx
div ecx
mov ecx, dword [esp + 0x680]
mov edi, eax
mov dword [esp + 0x40], eax
and edi, 0xffff
lea eax, [edi + 0xff]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov dword [esp + 0x4c], eax
mov eax, dword [ecx + 8]
imul eax, dword [esp + 0x34]
mov dword [esp + 0x34], eax
mov eax, dword [esi + 0x10c]
test eax, eax
je 0x10161a10
jmp 0x10161a36
mov edx, dword [esp + 0x34]
mov eax, 0x440dd2cf
imul edx, dword [esp + 0x48]
imul edx, dword [esp + 0x44]
mul edx
shr edx, 0x13
lea eax, [edx + edx*4]
shl eax, 6
add eax, edx
lea eax, [eax + eax*2]
shl eax, 0xb
mov ecx, dword [esp + 0x20]
xor edx, edx
imul ecx, dword [esp + 0x48]
imul ecx, dword [esp + 0x44]
lea eax, [ecx + eax - 1]
div ecx
mov ecx, eax
mov eax, dword [esp + 0x4c]
and ecx, 0xffff
and eax, 0xffff
add edi, ecx
lea edi, [eax + edi + 1]
mov eax, dword [esi + 0x10c]
test eax, eax
jne 0x10161a7f
cmp dword [esp + 0x34], 0x800
ja 0x10161a7c
add edi, 3
jmp 0x10161a7f
add edi, 6
mov eax, dword [esp + 0x24]
mov edx, eax
sub edx, ebx
cmp edx, edi
ja 0x10161a93
cmp eax, edi
jbe 0x10161a9f
sub eax, edi
mov ebx, eax
mov eax, dword [esp + 0x28]
cmp ebx, eax
jae 0x10161aa3
mov ebx, eax
jmp 0x10161aa3
mov ebx, dword [esp + 0x28]
mov al, byte [esi + 0x7c]
cmp al, 5
je 0x10161ab2
cmp al, 6
jb 0x10161b42
mov al, byte [esi + 0xf0]
test al, al
je 0x10161b42
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x680]
lea eax, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x680]
push ebx
push ecx
push edx
push ebp
push eax
push esi
call fcn.1015c0d0
add esp, 0x1c
jmp 0x10161b5f
mov al, byte [esp + 0x13]
test al, al
je 0x10161aa3
mov eax, 0x100
xor edx, edx
div edi
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
lea ebx, [ecx + edx]
sub eax, 2
cmp ebx, eax
jbe 0x10161b11
mov ebx, eax
jmp 0x101618b6
cmp ebx, dword [esp + 0x28]
jae 0x101618b6
mov eax, dword [esp + 0x1c]
push eax
call fcn.101d1786
mov ecx, dword [esp + 0x18]
push ecx
call fcn.101d1786
add esp, 8
mov eax, 0x1f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x67c]
push ebx
lea edx, [esp + 0x54]
push ecx
push edx
push ebp
push eax
push esi
call fcn.1015b340
add esp, 0x18
mov edi, eax
cmp edi, 1
je 0x10161b8a
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.101d1786
mov edx, dword [esp + 0x18]
push edx
call fcn.101d1786
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret
mov al, byte [esi + 0x110]
test al, al
je 0x10161c3c
cmp byte [esi + 0xb], 1
jne 0x10161c3c
mov al, byte [esi + 0x7c]
test al, al
je 0x10161c3c
mov al, byte [esp + 0x13]
test al, al
jne 0x10161c44
mov ax, word [esi + 0xae]
mov ecx, dword [esp + 0x40]
cmp ax, cx
jbe 0x10161bdc
sub eax, ecx
and eax, 0xffff
sub ebx, eax
mov eax, dword [esp + 0x28]
cmp ebx, eax
jae 0x10161bdc
mov ebx, eax
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x2c]
test eax, eax
mov dword [esp + 0x24], edx
jne 0x10161d21
lea ecx, [esp + 0x24]
lea edx, [esp + 0x1b]
push ecx
lea eax, [esp + 0x1e]
push edx
lea ecx, [esp + 0x58]
push eax
push ecx
push esi
call fcn.1015c300
add esp, 0x14
test eax, eax
jne 0x10161d4c
mov edx, dword [esp + 0x1c]
push edx
call fcn.101d1786
mov eax, dword [esp + 0x18]
push eax
call fcn.101d1786
add esp, 8
mov eax, 0x1f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret
mov al, byte [esp + 0x13]
test al, al
je 0x10161bdc
lea eax, [esp + 0x38]
lea ecx, [esp + 0x1b]
push eax
lea edx, [esp + 0x1e]
push ecx
lea eax, [esp + 0xf4]
push edx
push eax
push esi
call fcn.1015c300
add esp, 0x14
test eax, eax
jne 0x10161c8f
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.101d1786
mov edx, dword [esp + 0x18]
push edx
call fcn.101d1786
add esp, 8
mov eax, 0x1f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret
mov bl, byte [esi + 0x7a]
mov edi, dword [esp + 0x38]
test bl, bl
je 0x10161cd7
and ebx, 0xff
mov edx, dword [esp + 0x30]
mov ecx, ebx
sub ecx, edx
cmp ecx, edi
jbe 0x10161d7b
mov edx, dword [esp + 0x1c]
push edx
call fcn.101d1786
mov eax, dword [esp + 0x18]
push eax
call fcn.101d1786
add esp, 8
mov eax, 0x1f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret
mov eax, 0x100
xor edx, edx
div dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
lea ebx, [edi + ecx]
sub eax, 2
cmp ebx, eax
jbe 0x10161cf4
mov ebx, eax
jmp 0x10161ca0
cmp ebx, dword [esp + 0x28]
jae 0x10161ca0
mov edx, dword [esp + 0x1c]
push edx
call fcn.101d1786
mov eax, dword [esp + 0x18]
push eax
call fcn.101d1786
add esp, 8
mov eax, 0x1f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret
test edx, edx
jne 0x10161d50
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.101d1786
mov edx, dword [esp + 0x18]
push edx
call fcn.101d1786
add esp, 8
mov eax, 0x1f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret
mov edx, dword [esp + 0x24]
cmp ebx, edx
jb 0x10161d7f
mov eax, dword [esp + 0x1c]
push eax
call fcn.101d1786
mov ecx, dword [esp + 0x18]
push ecx
call fcn.101d1786
add esp, 8
mov eax, 0x1f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret
mov edx, dword [esp + 0x24]
mov al, byte [esp + 0x20]
mov ecx, 0x41
mov byte [ebp + 0x80b5], al
xor eax, eax
lea edi, [esp + 0x16c]
push edx
rep stosd dword es:[edi], eax
push ebx
lea ecx, [esp + 0x174]
push str._DistributeLUTs_:_Reserved_VBs_in_WB_d__TotalVBs_d_n
push ecx
mov dword [ebp + 0x80b8], edx
mov byte [ebp + 0x80b4], bl
call fcn.1003399c
add esp, 0x10
lea edx, [esp + 0x16c]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
test byte [esi + 7], 2
je 0x10161dd8
xor eax, eax
mov ax, word [esi + 0x22]
jmp 0x10161ddb
mov eax, dword [esi + 0x6c]
cmp byte [esi + 0xf0], 1
jne 0x10161ded
xor eax, eax
mov ax, word [esi + 0xf4]
mov cl, byte [esp + 0x13]
test cl, cl
je 0x10161e0f
mov ecx, dword [esi + 0x68]
xor edx, edx
mov dl, byte [ebp + 0x80b5]
shr ecx, 9
imul ecx, edx
imul ecx, dword [ebp + 0x80b8]
jmp 0x10161e2b
mov ecx, dword [ebp + 0x80b8]
mov edx, dword [esi + 0x68]
sub ecx, ebx
shr edx, 9
imul ecx, edx
xor edx, edx
mov dl, byte [ebp + 0x80b5]
imul ecx, edx
imul ecx, eax
mov dword [ebp + 0x80bc], ecx
mov al, byte [esi + 0x7c]
cmp al, 5
jne 0x10161e7e
mov eax, dword [esp + 0x690]
mov ecx, dword [esp + 0x674]
push eax
push ecx
call fcn.10169b30
mov edi, eax
add esp, 8
cmp edi, 1
je 0x10161e7e
mov edx, dword [esp + 0x1c]
push edx
call fcn.101d1786
mov eax, dword [esp + 0x18]
push eax
call fcn.101d1786
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret
mov cl, byte [esi + 8]
and cl, 0xc0
cmp cl, 0x80
je 0x10161ec7
mov al, byte [esi + 0x7c]
cmp al, 3
je 0x10161e9e
cmp al, 6
jb 0x10161ec7
mov al, byte [esi + 0xf0]
test al, al
jne 0x10161ec7
mov eax, dword [esp + 0x674]
push 1
lea edx, [esp + 0xd4]
push esi
push edx
push eax
mov byte [esi + 0x131], 1
call sym.ITEuDllvMgr.dll_FLH_FindRootTable
add esp, 0x10
mov byte [esi + 0x131], 0
mov al, byte [esp + 0x13]
test al, al
je 0x10161f15
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x20]
sub ebx, ecx
mov edx, dword [esp + 0x14]
imul ebx, eax
mov edi, ebx
mov ebx, eax
imul ebx, ecx
mov ecx, dword [esp + 0x68c]
mov eax, dword [esp + 0x1c]
push 1
push ecx
mov ecx, dword [esp + 0x684]
push ebx
push edi
push ebp
push edx
mov edx, dword [esp + 0x68c]
push eax
push ecx
push esi
push edx
call fcn.10162e20
add esp, 0x28
jmp 0x10161f51
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x68c]
imul edi, ebx
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
push 0
push eax
mov eax, dword [esp + 0x684]
push 0
push edi
push ebp
push ecx
mov ecx, dword [esp + 0x68c]
push edx
push eax
push esi
push ecx
call fcn.10162e20
mov ebx, dword [esp + 0x68]
add esp, 0x28
cmp eax, 1
je 0x10161f7d
mov edx, dword [esp + 0x1c]
push edx
call fcn.101d1786
mov eax, dword [esp + 0x18]
push eax
call fcn.101d1786
add esp, 8
mov eax, 0x25
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret
mov ecx, dword [esp + 0x68c]
mov edx, dword [esp + 0x67c]
mov eax, dword [esp + 0x674]
push ecx
push edx
push esi
push ebp
push eax
call fcn.10163510
add esp, 0x14
cmp eax, 1
je 0x10161fcb
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.101d1786
mov edx, dword [esp + 0x18]
push edx
call fcn.101d1786
add esp, 8
mov eax, 0x26
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret
mov al, byte [esp + 0x13]
test al, al
je 0x10161fff
mov eax, dword [ebp + 0x80b8]
mov ecx, dword [esp + 0x68c]
imul eax, dword [esp + 0x20]
mov edx, dword [esp + 0x67c]
push ecx
push edx
push esi
mov esi, dword [esp + 0x28]
and ebx, 0xffff
push eax
lea eax, [esi + ebx*2]
jmp 0x10162033
mov eax, dword [ebp + 0x80b8]
xor edx, edx
mov dl, byte [ebp + 0x80b4]
mov ecx, dword [esp + 0x68c]
sub eax, edx
mov edx, dword [esp + 0x67c]
imul eax, dword [esp + 0x20]
push ecx
push edx
push esi
mov esi, dword [esp + 0x28]
and edi, 0xffff
push eax
lea eax, [esi + edi*2]
mov ecx, dword [esp + 0x684]
push eax
push ebp
push ecx
call fcn.101638d0
add esp, 0x1c
cmp eax, 1
push esi
je 0x1016206d
call fcn.101d1786
mov edx, dword [esp + 0x18]
push edx
call fcn.101d1786
add esp, 8
mov eax, 0x27
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret
call fcn.101d1786
mov eax, dword [esp + 0x18]
push eax
call fcn.101d1786
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x660
ret