Function at 0x406d54
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
and byte [ebp - 4], 0
mov eax, dword [edi + 0x144]
or dword [edi + 0x150], 0xffffffff
or dword [edi + 0x14c], 0xffffffff
mov esi, dword [edi]
movsx ecx, word [edi + 0x14]
movzx edx, byte [eax + edi + 0x28]
mov eax, dword [edi + 0x140]
imul eax, ecx
lea ebx, [eax + eax*4]
add ebx, dword [esi + edx*8 + 4]
mov dword [ebp - 0x18], ebx
je 0x407502
and dword [ebp - 0x10], 0
test ecx, ecx
jle 0x407502
mov esi, dword [ebp - 0x10]
mov al, byte [ebx + 4]
imul esi, esi, 0xac
mov cl, al
and al, 0xf
shr cl, 4
mov byte [ebp - 1], cl
mov cl, al
mov al, byte [ebx + 3]
add esi, 0x4267e0
cmp al, 3
mov byte [ebp - 3], cl
je 0x406dda
cmp al, 5
je 0x406dda
and byte [ebp - 2], 0
jmp 0x406dde
mov byte [ebp - 2], 1
mov al, byte [ebx + 1]
test al, al
je 0x406df0
cmp byte [ebp - 2], 0
jne 0x406df0
dec al
mov byte [esi + 0x66], al
mov al, byte [ebx]
test al, al
je 0x406e04
cmp al, 0xff
je 0x406e04
cmp byte [ebp - 2], 0
jne 0x406e04
dec al
mov byte [esi], al
movzx eax, byte [esi + 0x66]
movsx edx, word [edi + 0x20]
cmp eax, edx
jl 0x406e27
and dword [0x427ee0], 0
mov dword [ebp - 8], 0x427d80
mov dword [ebp - 0xc], 0x427ee0
jmp 0x406e5a
imul eax, eax, 0x154
add eax, dword [edi + 4]
mov edx, eax
movzx eax, byte [esi]
mov dword [ebp - 8], edx
mov al, byte [eax + edx + 0x44]
cmp al, 0x10
jb 0x406e47
mov edx, 0x427ee0
jmp 0x406e4e
movzx eax, al
mov edx, dword [edx + eax*4 + 4]
cmp byte [ebp - 2], 0
mov dword [ebp - 0xc], edx
jne 0x406e5a
mov dword [esi + 8], edx
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
cmp byte [esi + 0x6c], 7
mov dword [ebp - 0x24], edx
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x28], edx
jne 0x406e80
cmp byte [ebx + 3], 7
je 0x406e80
mov edx, dword [esi + 0x18]
add edx, eax
mov dword [esi + 0x10], edx
mov al, byte [ebx + 3]
and dword [esi + 0x18], 0
and byte [esi + 2], 0
mov byte [esi + 0x6c], al
mov al, byte [ebx]
test al, al
je 0x406eee
cmp al, 0xff
je 0x406eee
mov ecx, dword [ebp - 0xc]
mov cl, byte [ecx + 0x1f]
add cl, al
mov eax, dword [ebp - 0xc]
dec cl
mov byte [esi + 0x67], cl
test byte [edi + 0x22], 1
movsx eax, byte [eax + 0x11]
je 0x406ecc
movzx ecx, cl
cdq
sub eax, edx
neg ecx
sar eax, 1
shl ecx, 6
sub ecx, eax
add ecx, 0x1e00
mov dword [esi + 0x68], ecx
jmp 0x406edb
push eax
movzx eax, cl
push eax
call fcn.0040699c
pop ecx
mov dword [esi + 0x68], eax
pop ecx
cmp byte [ebp - 2], 0
jne 0x406ee7
mov eax, dword [esi + 0x68]
mov dword [esi + 0xc], eax
mov cl, byte [ebp - 3]
mov byte [esi + 2], 8
and dword [esi + 0x1c], 0
or byte [esi + 2], 3
cmp byte [ebx + 1], 0
mov dl, byte [ebp - 1]
je 0x406f10
push dword [ebp - 0xc]
push esi
call fcn.00406cd6
mov dl, byte [ebp - 1]
pop ecx
pop ecx
mov cl, byte [ebp - 3]
mov al, byte [ebx + 2]
test al, al
je 0x406f26
push eax
push esi
call fcn.004068a6
mov dl, byte [ebp - 1]
pop ecx
pop ecx
mov cl, byte [ebp - 3]
cmp byte [ebx], 0xff
je 0x406f31
cmp byte [ebx + 3], 0x14
jne 0x406f35
mov byte [esi + 0x65], 1
mov eax, dword [ebp - 8]
mov al, byte [eax + 0x14c]
test al, 1
mov byte [ebp - 0x1c], al
je 0x406f9f
lea eax, [esi + 0x3c]
cmp byte [eax], 0
jne 0x406fa9
lea ecx, [esi + 0x38]
push 2
push ecx
push eax
lea eax, [esi + 0x30]
push eax
lea eax, [esi + 0x34]
push eax
mov eax, dword [ebp - 8]
mov cl, byte [eax + 0x146]
push ecx
mov cl, byte [eax + 0x147]
push ecx
mov cl, byte [eax + 0x148]
push ecx
lea ecx, [eax + 0xa4]
movzx eax, byte [eax + 0x144]
push ecx
push eax
push dword [ebp - 0x1c]
lea eax, [esi + 0x28]
push eax
lea eax, [esi + 0x2c]
push eax
push esi
call fcn.004067b4
mov cl, byte [ebp - 3]
mov dl, byte [ebp - 1]
add esp, 0x38
jmp 0x406fa9
cmp byte [esi + 0x65], 0
je 0x406fa9
and dword [esi + 0x34], 0
mov eax, dword [ebp - 8]
mov al, byte [eax + 0x14d]
test al, 1
mov byte [ebp - 0x20], al
je 0x407011
lea eax, [esi + 0x54]
cmp byte [eax], 0
jne 0x407011
lea ecx, [esi + 0x50]
push 4
push ecx
push eax
lea eax, [esi + 0x48]
push eax
lea eax, [esi + 0x4c]
push eax
mov eax, dword [ebp - 8]
mov cl, byte [eax + 0x149]
push ecx
mov cl, byte [eax + 0x14a]
push ecx
mov cl, byte [eax + 0x14b]
push ecx
lea ecx, [eax + 0xf4]
movzx eax, byte [eax + 0x145]
push ecx
push eax
push dword [ebp - 0x20]
lea eax, [esi + 0x40]
push eax
lea eax, [esi + 0x44]
push eax
push esi
call fcn.004067b4
mov cl, byte [ebp - 3]
mov dl, byte [ebp - 1]
add esp, 0x38
cmp byte [esi + 0x65], 0
je 0x40702e
mov eax, dword [ebp - 8]
movzx eax, word [eax + 0x152]
sub dword [esi + 0x58], eax
jns 0x40702a
and dword [esi + 0x58], 0
or byte [esi + 2], 2
movzx eax, byte [ebx + 3]
cmp eax, 0x15
jg 0x40745f
je 0x407375
dec eax
cmp eax, 0x10
ja case.0x4071e4.3
jmp dword [eax*4 + 0x407507]
mov al, byte [ebx + 4]
test al, al
je case.0x4071e4.3
mov byte [esi + 0x79], al
jmp case.0x4071e4.3
mov al, byte [ebx + 4]
test al, al
je case.0x4071e4.3
mov byte [esi + 0x78], al
jmp case.0x4071e4.3
mov al, byte [ebx + 4]
test al, al
je 0x407085
mov byte [esi + 0x84], al
mov eax, dword [esi + 0x68]
mov dword [esi + 0x80], eax
jmp 0x4070a3
mov eax, dword [esi + 0x68]
mov dword [esi + 0x80], eax
mov al, byte [ebx + 4]
test al, al
je 0x4070a3
mov byte [esi + 0x7c], al
and byte [esi + 2], 0xf6
jmp case.0x4071e4.3
test dl, dl
je 0x4070b6
mov byte [esi + 0x86], dl
test cl, cl
je 0x4070c0
mov byte [esi + 0x87], cl
push esi
call fcn.0040653d
jmp 0x4074b7
mov al, byte [ebx + 4]
test al, al
je 0x4070c0
mov byte [esi + 0x7c], al
jmp 0x4070c0
test dl, dl
je 0x4070e1
mov byte [esi + 0x8a], dl
test cl, cl
je case.0x4071e4.3
mov byte [esi + 0x8b], cl
jmp case.0x4071e4.3
movzx eax, byte [ebx + 4]
jmp 0x4072a1
mov al, byte [ebx + 4]
test al, al
je 0x40710a
movzx eax, al
mov dword [esi + 0x70], eax
cmp dword [esi + 4], 0
je case.0x4071e4.3
mov ecx, dword [ebp - 0xc]
mov eax, dword [esi + 0x70]
shl eax, 8
mov edx, dword [ecx + 0xc]
add edx, dword [ecx + 8]
cmp eax, edx
jb 0x407136
mov al, byte [esi + 2]
and al, 0xf7
or al, 0x20
mov byte [esi + 2], al
jmp case.0x4071e4.3
mov ecx, dword [esi + 4]
mov dword [ecx + 0x18], eax
jmp case.0x4071e4.3
mov al, byte [ebx + 4]
test al, al
je case.0x4071e4.3
mov byte [esi + 0x7c], al
jmp case.0x4071e4.3
movzx eax, byte [ebx + 4]
and dword [edi + 0x14c], 0
mov dword [edi + 0x150], eax
movsx eax, word [edi + 0x10]
cmp dword [edi + 0x150], eax
jl 0x407178
and dword [edi + 0x150], 0
mov byte [ebp - 4], 1
jmp case.0x4071e4.3
movzx eax, byte [ebx + 4]
jmp 0x4072c5
movzx eax, dl
movzx ecx, cl
lea eax, [eax + eax*4]
lea eax, [ecx + eax*2]
cmp eax, 0x3f
mov dword [edi + 0x14c], eax
jle 0x4071a8
and dword [edi + 0x14c], 0
cmp byte [ebp - 4], 0
jne 0x4071bb
mov eax, dword [edi + 0x144]
inc eax
mov dword [edi + 0x150], eax
movsx eax, word [edi + 0x10]
cmp dword [edi + 0x150], eax
jl case.0x4071e4.3
and dword [edi + 0x150], 0
jmp case.0x4071e4.3
movzx eax, dl
dec eax
cmp eax, 0xd
ja case.0x4071e4.3
jmp dword [eax*4 + 0x40754b]
test cl, cl
je 0x4071f5
mov byte [esi + 0xa8], cl
movzx eax, byte [esi + 0xa8]
shl eax, 2
jmp 0x407481
test cl, cl
je 0x40720e
mov byte [esi + 0xa9], cl
movzx eax, byte [esi + 0xa9]
shl eax, 2
add dword [esi + 0xc], eax
jmp case.0x4071e4.3
lea eax, [esi + 0xa2]
mov dl, byte [eax]
and dl, 0xf0
or dl, cl
mov byte [eax], dl
jmp case.0x4071e4.3
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x11], cl
jmp case.0x4071e4.3
test cl, cl
jne 0x407254
mov eax, dword [edi + 0x140]
mov dword [esi + 0x98], eax
jmp case.0x4071e4.3
lea eax, [esi + 0x9c]
mov edx, dword [eax]
test edx, edx
jne 0x407267
movzx ecx, cl
mov dword [eax], ecx
jmp 0x40726a
dec edx
mov dword [eax], edx
cmp dword [eax], 0
je case.0x4071e4.3
mov eax, dword [esi + 0x98]
mov dword [edi + 0x14c], eax
jmp case.0x4071e4.3
lea eax, [esi + 0xa2]
shl cl, 4
mov dl, byte [eax]
and dl, 0xf
or cl, dl
mov byte [eax], cl
jmp case.0x4071e4.3
movzx eax, cl
shl eax, 4
mov dword [esi + 0x14], eax
jmp 0x4074d2
test cl, cl
je 0x4072b3
mov byte [esi + 0xa7], cl
movzx eax, byte [esi + 0xa7]
add dword [esi + 0x10], eax
push 0x40
pop eax
cmp dword [esi + 0x10], eax
jle 0x4072c8
mov dword [esi + 0x10], eax
or byte [esi + 2], 2
jmp case.0x4071e4.3
test cl, cl
je 0x4072db
mov byte [esi + 0xa7], cl
movzx eax, byte [esi + 0xa7]
sub dword [esi + 0x10], eax
jns 0x4072c8
and dword [esi + 0x10], 0
jmp 0x4072c8
mov eax, dword [ebp - 0x14]
and byte [esi + 2], 0xf0
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x28]
mov dword [esi + 0x14], eax
jmp case.0x4071e4.3
movzx eax, cl
mov ecx, dword [edi + 0x138]
imul ecx, eax
mov dword [edi + 0x148], ecx
jmp case.0x4071e4.3
mov al, byte [ebx + 4]
cmp al, 0x20
movzx eax, al
jae 0x407334
mov dword [edi + 0x138], eax
jmp case.0x4071e4.3
push eax
push edi
call fcn.00405f00
pop ecx
jmp 0x4074b7
movzx ecx, byte [ebx + 4]
push 0x40
lea eax, [edi + 0x12c]
pop edx
cmp ecx, edx
mov dword [eax], ecx
jle 0x4072c8
mov dword [eax], edx
jmp 0x4072c8
mov al, byte [ebx + 4]
test al, al
je case.0x4071e4.3
mov byte [edi + 0x130], al
jmp case.0x4071e4.3
mov eax, dword [ebp - 8]
test byte [eax + 0x14c], 1
je case.0x4071e4.3
mov ecx, dword [ebp - 8]
xor eax, eax
lea edx, [ecx + 0xa8]
movzx cx, byte [ebx + 4]
cmp cx, word [edx]
jbe 0x4073c1
mov edx, dword [ebp - 8]
add edx, 0xa8
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 8]
movzx edx, byte [edx + 0x144]
cmp eax, edx
jge 0x4073c1
add dword [ebp - 0x14], 4
inc eax
mov edx, dword [ebp - 0x14]
cmp cx, word [edx]
ja 0x4073a6
mov ecx, dword [ebp - 8]
mov dword [esi + 0x2c], eax
movzx ecx, byte [ecx + 0x144]
lea edx, [ecx - 1]
cmp eax, edx
jl 0x4073ec
mov eax, dword [ebp - 8]
movzx eax, word [eax + ecx*4 + 0xa2]
mov dword [esi + 0x34], eax
mov byte [esi + 0x3c], 1
jmp case.0x4071e4.3
mov ecx, dword [ebp - 0x18]
and byte [esi + 0x3c], 0
mov edx, dword [ebp - 8]
lea ebx, [eax + 1]
movzx ecx, byte [ecx + 4]
mov dword [esi + 0x28], ecx
movzx ecx, word [edx + eax*4 + 0xa4]
movzx edi, word [edx + ebx*4 + 0xa4]
mov dword [ebp - 0x14], ecx
movzx ecx, word [edx + eax*4 + 0xa6]
shl ecx, 0x10
sub edi, dword [ebp - 0x14]
je 0x40743a
mov eax, edx
movzx eax, word [eax + ebx*4 + 0xa6]
shl eax, 0x10
sub eax, ecx
cdq
idiv edi
mov dword [esi + 0x38], eax
jmp 0x40743e
and dword [esi + 0x38], 0
mov eax, dword [esi + 0x28]
mov edi, dword [ebp + 8]
sub eax, dword [ebp - 0x14]
mov dword [esi + 0x2c], ebx
mov ebx, dword [ebp - 0x18]
imul eax, dword [esi + 0x38]
add eax, ecx
mov dword [esi + 0x30], eax
movsx eax, word [esi + 0x32]
mov dword [esi + 0x34], eax
jmp case.0x4071e4.3
sub eax, 0x19
je 0x4074c8
dec eax
dec eax
je 0x4074ba
dec eax
dec eax
je 0x40749b
sub eax, 4
jne case.0x4071e4.3
cmp dl, 1
jne 0x407486
test cl, cl
je 0x40747d
mov byte [esi + 0x7b], cl
movzx eax, byte [esi + 0x7b]
sub dword [esi + 0xc], eax
jmp case.0x4071e4.3
cmp dl, 2
jne case.0x4071e4.3
test cl, cl
je 0x407492
mov byte [esi + 0x7a], cl
movzx eax, byte [esi + 0x7a]
jmp 0x407218
cmp byte [ebx + 4], 0
je 0x4074b1
inc dl
inc cl
mov byte [esi + 0x93], dl
mov byte [esi + 0x94], cl
push esi
call fcn.00406a7b
pop ecx
jmp case.0x4071e4.3
cmp byte [ebx + 4], 0
je case.0x4071e4.3
mov byte [esi + 0x7e], dl
mov byte [esi + 0x7f], cl
jmp case.0x4071e4.3
mov al, byte [ebx + 4]
test al, al
je case.0x4071e4.3
mov byte [esi + 0x7d], al
or byte [esi + 2], 4
push dword [ebp - 8]
push esi
call fcn.004065db
push edi
push dword [ebp - 0xc]
push esi
call fcn.00406ac0
movsx eax, word [edi + 0x14]
add esp, 0x14
inc dword [ebp - 0x10]
add ebx, 5
cmp dword [ebp - 0x10], eax
mov dword [ebp - 0x18], ebx
jl 0x406da8
pop edi
pop esi
pop ebx
leave
ret