Function at 0x406550
Capabilities:
Enumerate pe sections
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xd4
mov ebx, dword [esp + 0xe8]
mov dword [esp], eax
mov dword [esp + 0x30], edx
cmp ebx, 9
jbe 0x4065a0
mov eax, ecx
movzx ecx, word [ecx]
movzx edx, word [eax + 4]
movzx esi, word [eax + 2]
mov dword [esp + 4], edx
lea ebp, [ecx + esi]
mov edx, 0xfffffffa
sub edx, ebp
sub edx, dword [esp + 4]
lea ebp, [edx + ebx]
mov edx, dword [esp + 0xec]
mov edx, dword [edx]
mov dword [esp + 0xc], edx
cmp ebx, ebp
jae 0x4065b0
mov eax, 0xffffffec
add esp, 0xd4
pop ebx
pop esi
pop edi
pop ebp
ret
test ecx, ecx
je 0x4071e0
lea edx, [eax + 0xa]
lea ebx, [eax + 6]
mov dword [esp + 0x44], edx
mov dword [esp + 0x94], edx
movzx edx, byte [eax + ecx + 5]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x90], ebx
cmp ecx, 3
ja 0x4071a0
mov dword [esp + 0x8c], ebx
movzx ebx, byte [eax + 6]
mov dword [esp + 0x84], ebx
cmp cx, 2
je 0x406609
cmp cx, 3
jne 0x406619
movzx edi, byte [eax + 8]
shl edi, 0x10
add ebx, edi
movzx eax, byte [eax + 7]
shl eax, 8
add eax, ebx
mov dword [esp + 0x84], eax
test dl, dl
je 0x4065a0
mov eax, 5
bsr edx, edx
sub eax, ecx
shl eax, 3
sub eax, edx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x34], eax
lea ebx, [eax + ecx]
mov eax, dword [esp + 8]
mov ecx, esi
mov edx, ebx
mov dword [esp + 0x88], eax
lea eax, [esp + 0x98]
call fcn.00401b20
cmp eax, 0xffffff88
ja 0x4065a5
mov edi, dword [esp + 4]
add ebx, esi
lea eax, [esp + 0xac]
mov edx, ebx
mov ecx, edi
call fcn.00401b20
cmp eax, 0xffffff88
ja 0x4065a5
add edi, ebx
mov ecx, ebp
lea eax, [esp + 0xc0]
mov edx, edi
call fcn.00401b20
cmp eax, 0xffffff88
ja 0x4065a5
mov edi, dword [esp]
mov esi, dword [esp + 0x30]
mov eax, edi
add eax, esi
lea ebx, [eax - 3]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0xec]
mov dword [esp + 0x68], ebx
lea ebp, [eax + 4]
lea eax, [esi + 3]
shr eax, 2
lea ecx, [edi + eax]
mov esi, eax
lea edi, [ecx + eax]
mov eax, dword [esp + 0xc]
mov dword [esp + 0x74], ecx
add esi, edi
mov dword [esp + 0x70], edi
shr eax, 0x10
mov dword [esp + 0x78], esi
movzx edx, al
mov dword [esp + 0x7c], edx
cmp ebx, esi
jbe 0x407309
mov edi, dword [esp + 0x9c]
mov eax, dword [esp + 0x84]
mov dword [esp + 0xc], esi
neg edx
mov ebx, dword [esp + 0xc0]
mov esi, dword [esp + 0x70]
and edx, 0x1f
mov dword [esp + 0x10], ecx
mov dword [esp + 0x24], edi
mov edi, dword [esp + 0xa0]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 0x3c], edi
mov edi, dword [esp + 0xa8]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xac]
mov dword [esp + 0x4c], edi
mov edi, dword [esp + 0xb4]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0xb0]
mov dword [esp + 0x38], edi
mov edi, dword [esp + 0xbc]
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0xc4]
mov dword [esp + 0x48], edi
mov edi, dword [esp + 0xc8]
mov dword [esp + 0x28], esi
mov dword [esp + 0x20], edi
mov edi, dword [esp + 0xd0]
mov byte [esp + 0x6f], 0
mov dword [esp + 0x50], edi
mov byte [esp + 0x6d], 0
mov byte [esp + 0x6c], 0
mov byte [esp + 0x6e], 0
mov edi, dword [esp + 0x24]
mov dword [esp + 4], edx
jmp 0x4067bc
mov esi, dword [esp + 0x64]
mov byte [esp + 0x6e], dl
mov dword [esp + 0x34], esi
movzx ecx, byte [esp + 8]
mov esi, dword [esp + 0x2c]
mov edx, dword [esp + 8]
shl esi, cl
movzx ecx, byte [esp + 4]
shr esi, cl
lea esi, [ebp + esi*2]
movzx ecx, byte [esi]
movzx esi, byte [esi + 1]
add edx, esi
mov esi, dword [esp]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x14]
mov byte [esi], cl
mov ecx, edi
shl edx, cl
movzx ecx, byte [esp + 4]
mov esi, edx
shr esi, cl
lea ecx, [ebp + esi*2]
movzx esi, byte [ecx]
movzx ecx, byte [ecx + 1]
add edi, ecx
mov ecx, dword [esp + 0x10]
mov edx, esi
mov esi, dword [esp + 0x1c]
mov byte [ecx], dl
mov ecx, eax
mov edx, dword [esp + 0x28]
shl esi, cl
movzx ecx, byte [esp + 4]
shr esi, cl
lea ecx, [ebp + esi*2]
movzx esi, byte [ecx]
movzx ecx, byte [ecx + 1]
add ecx, eax
mov eax, esi
mov byte [edx], al
mov eax, dword [esp + 0x18]
mov dword [esp + 0x24], ecx
mov ecx, ebx
shl eax, cl
movzx ecx, byte [esp + 4]
shr eax, cl
lea eax, [ebp + eax*2]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
lea esi, [eax + ebx]
mov ebx, dword [esp]
mov eax, dword [esp + 0xc]
mov dword [esp + 0x5c], ebx
add ebx, 2
mov byte [eax], cl
mov eax, dword [esp + 0x2c]
mov dword [esp], ebx
mov edx, dword [esp + 8]
mov ecx, edx
shl eax, cl
movzx ecx, byte [esp + 4]
shr eax, cl
lea eax, [ebp + eax*2]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
add eax, edx
mov byte [ebx - 1], cl
mov ecx, edi
mov ebx, dword [esp + 0x10]
mov dword [esp + 8], eax
mov edx, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x60], ebx
add ebx, 2
shl eax, cl
movzx ecx, byte [esp + 4]
mov dword [esp + 0x10], ebx
shr eax, cl
lea ecx, [ebp + eax*2]
movzx eax, byte [ecx]
movzx ecx, byte [ecx + 1]
mov byte [ebx - 1], al
add edi, ecx
mov eax, dword [esp + 0x1c]
movzx ecx, byte [esp + 0x24]
mov ebx, dword [esp + 0x28]
shl eax, cl
movzx ecx, byte [esp + 4]
mov dword [esp + 0x58], ebx
add ebx, 2
mov dword [esp + 0x28], ebx
shr eax, cl
lea eax, [ebp + eax*2]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
add eax, dword [esp + 0x24]
mov byte [ebx - 1], cl
mov ebx, dword [esp + 0xc]
mov ecx, esi
mov dword [esp + 0x54], ebx
add ebx, 2
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 0x18]
shl ebx, cl
movzx ecx, byte [esp + 4]
shr ebx, cl
lea ebx, [ebp + ebx*2]
movzx ecx, byte [ebx]
movzx ebx, byte [ebx + 1]
add ebx, esi
mov esi, dword [esp + 0xc]
mov byte [esi - 1], cl
mov esi, dword [esp + 0x34]
cmp dword [esp + 0x44], esi
ja 0x4072c0
mov ecx, edx
and edx, 7
mov byte [esp + 0x6f], 1
shr ecx, 3
mov dword [esp + 8], edx
sub esi, ecx
xor ecx, ecx
mov edx, dword [esi]
mov dword [esp + 0x64], esi
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x3c]
cmp dword [esp + 0x4c], edx
ja 0x4072b0
mov esi, edi
mov byte [esp + 0x6d], 1
and edi, 7
shr esi, 3
sub edx, esi
mov dword [esp + 0x3c], edx
mov edx, dword [edx]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x38]
cmp dword [esp + 0x48], edx
ja 0x4071f0
mov esi, eax
and eax, 7
shr esi, 3
sub edx, esi
mov esi, dword [esp + 0x20]
mov dword [esp + 0x38], edx
mov edx, dword [edx]
mov dword [esp + 0x1c], edx
cmp dword [esp + 0x50], esi
ja 0x407346
mov esi, ebx
and ebx, 7
shr esi, 3
sub dword [esp + 0x20], esi
mov esi, dword [esp + 0x20]
test ecx, ecx
sete dl
mov esi, dword [esi]
mov dword [esp + 0x18], esi
mov esi, edx
mov edx, dword [esp + 0xc]
cmp dword [esp + 0x68], edx
mov edx, esi
seta cl
and dl, cl
mov byte [esp + 0x6c], dl
je 0x40736f
mov esi, dword [esp + 0x34]
cmp dword [esp + 0x44], esi
jbe 0x4067b0
mov edx, dword [esp + 4]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x24], edi
mov edi, dword [esp + 8]
mov ecx, edi
shl esi, cl
mov ecx, edx
shr esi, cl
lea esi, [ebp + esi*2]
movzx ecx, byte [esi]
movzx esi, byte [esi + 1]
add esi, edi
mov edi, dword [esp + 0x24]
mov dword [esp + 4], esi
mov esi, dword [esp]
mov byte [esi], cl
mov esi, dword [esp + 0x14]
mov ecx, edi
shl esi, cl
mov ecx, edx
shr esi, cl
lea esi, [ebp + esi*2]
movzx ecx, byte [esi]
movzx esi, byte [esi + 1]
add edi, esi
mov esi, dword [esp + 0x10]
mov byte [esi], cl
mov esi, dword [esp + 0x1c]
mov ecx, eax
shl esi, cl
mov ecx, edx
shr esi, cl
lea esi, [ebp + esi*2]
movzx ecx, byte [esi]
movzx esi, byte [esi + 1]
add eax, esi
mov esi, dword [esp + 0x28]
mov byte [esi], cl
mov esi, dword [esp + 0x18]
mov ecx, ebx
shl esi, cl
mov ecx, edx
shr esi, cl
lea esi, [ebp + esi*2]
movzx ecx, byte [esi]
movzx esi, byte [esi + 1]
add esi, ebx
mov ebx, dword [esp + 0xc]
mov byte [ebx], cl
mov ecx, dword [esp + 0x5c]
mov ebx, dword [esp + 0x2c]
add ecx, 4
mov dword [esp], ecx
movzx ecx, byte [esp + 4]
shl ebx, cl
mov ecx, edx
shr ebx, cl
lea ebx, [ebp + ebx*2]
movzx ecx, byte [ebx]
movzx ebx, byte [ebx + 1]
add ebx, dword [esp + 4]
mov dword [esp + 8], ebx
mov ebx, dword [esp]
mov byte [ebx - 1], cl
mov ecx, dword [esp + 0x60]
mov ebx, dword [esp + 0x14]
add ecx, 4
mov dword [esp + 0x10], ecx
mov ecx, edi
shl ebx, cl
mov ecx, edx
shr ebx, cl
lea ebx, [ebp + ebx*2]
movzx ecx, byte [ebx]
movzx ebx, byte [ebx + 1]
add edi, ebx
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x24], edi
mov byte [ebx - 1], cl
mov ecx, dword [esp + 0x58]
mov ebx, dword [esp + 0x1c]
add ecx, 4
mov edi, ecx
mov dword [esp + 0x28], ecx
mov ecx, eax
shl ebx, cl
mov ecx, edx
shr ebx, cl
lea ebx, [ebp + ebx*2]
movzx ecx, byte [ebx]
movzx ebx, byte [ebx + 1]
mov byte [edi - 1], cl
mov ecx, dword [esp + 0x54]
add eax, ebx
mov ebx, dword [esp + 0x18]
add ecx, 4
mov edi, ecx
mov dword [esp + 0xc], ecx
mov ecx, esi
shl ebx, cl
mov ecx, edx
shr ebx, cl
lea ecx, [ebp + ebx*2]
movzx ebx, byte [ecx + 1]
movzx edx, byte [ecx]
add ebx, esi
mov byte [edi - 1], dl
mov esi, dword [esp + 0x3c]
cmp dword [esp + 0x4c], esi
ja 0x406b5b
mov edi, dword [esp + 0x24]
movzx edx, byte [esp + 0x6c]
mov ecx, edi
and edi, 7
mov byte [esp + 0x6d], dl
shr ecx, 3
mov dword [esp + 0x24], edi
sub esi, ecx
mov dword [esp + 0x3c], esi
mov esi, dword [esi]
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x38]
cmp dword [esp + 0x48], esi
ja 0x406b79
mov edx, eax
and eax, 7
shr edx, 3
sub esi, edx
mov edx, dword [esi]
mov dword [esp + 0x38], esi
mov dword [esp + 0x1c], edx
mov esi, dword [esp + 0x20]
cmp dword [esp + 0x50], esi
ja 0x4072d0
mov edx, ebx
and ebx, 7
shr edx, 3
sub esi, edx
mov edx, dword [esi]
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], edx
mov edi, dword [esp + 8]
mov dword [esp + 0xb0], eax
mov eax, dword [esp + 0x20]
cmp byte [esp + 0x6c], 0
mov dword [esp + 0xc4], ebx
mov dword [esp + 0x88], edi
mov edi, dword [esp + 0x24]
mov dword [esp + 0xc8], eax
mov dword [esp + 0x9c], edi
je 0x406bdc
mov eax, dword [esp + 0x38]
mov dword [esp + 0xb4], eax
cmp byte [esp + 0x6d], 0
je 0x406bee
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xa0], eax
cmp byte [esp + 0x6f], 0
je 0x406c0b
mov eax, dword [esp + 0x64]
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x84], eax
cmp byte [esp + 0x6d], 0
je 0x406c1d
mov eax, dword [esp + 0x14]
mov dword [esp + 0x98], eax
cmp byte [esp + 0x6c], 0
je 0x406c2f
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xac], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0xc0], eax
mov edi, dword [esp + 0x74]
mov ebx, dword [esp]
mov esi, dword [esp + 0x10]
cmp edi, ebx
setb al
cmp dword [esp + 0x70], esi
setb dl
or al, dl
jne 0x4065a0
mov edx, dword [esp + 0x28]
cmp dword [esp + 0x78], edx
jb 0x4065a0
mov eax, dword [esp + 0x7c]
sub edi, 3
neg eax
and eax, 0x1f
mov esi, eax
jmp 0x406cd2
cmp ebx, edi
jae 0x406ce2
mov eax, dword [esp + 0x84]
movzx ecx, byte [esp + 0x88]
add ebx, 2
mov edx, eax
shl edx, cl
mov ecx, esi
shr edx, cl
lea edx, [ebp + edx*2]
movzx ecx, byte [edx]
movzx edx, byte [edx + 1]
add edx, dword [esp + 0x88]
mov byte [ebx - 2], cl
mov ecx, edx
shl eax, cl
mov ecx, esi
shr eax, cl
lea eax, [ebp + eax*2]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
add eax, edx
mov byte [ebx - 1], cl
mov dword [esp + 0x88], eax
lea eax, [esp + 0x84]
call fcn.004016a0
test eax, eax
je 0x406c80
mov eax, dword [esp + 0x7c]
mov edi, ebx
mov esi, dword [esp + 0x74]
neg eax
and eax, 0x1f
mov ebx, eax
jmp 0x406d30
cmp esi, edi
jbe 0x406d8c
mov edx, dword [esp + 0x88]
mov eax, dword [esp + 0x84]
add edi, 1
mov ecx, edx
shl eax, cl
mov ecx, ebx
shr eax, cl
lea eax, [ebp + eax*2]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
add eax, edx
mov byte [edi - 1], cl
mov dword [esp + 0x88], eax
lea eax, [esp + 0x84]
call fcn.004016a0
test eax, eax
je 0x406cf8
mov eax, edi
cmp dword [esp + 0x74], edi
jbe 0x406d8c
mov ebx, dword [esp + 0x7c]
mov esi, dword [esp + 0x84]
mov edx, dword [esp + 0x88]
neg ebx
and ebx, 0x1f
nop
mov ecx, edx
mov edi, esi
add eax, 1
shl edi, cl
mov ecx, ebx
shr edi, cl
lea ecx, [ebp + edi*2]
movzx edi, byte [ecx]
movzx ecx, byte [ecx + 1]
add edx, ecx
mov ecx, edi
mov byte [eax - 1], cl
cmp dword [esp + 0x74], eax
jne 0x406d60
mov dword [esp + 0x88], edx
mov eax, dword [esp + 0x70]
mov ebx, dword [esp + 0x10]
lea edi, [eax - 3]
mov eax, dword [esp + 0x7c]
neg eax
and eax, 0x1f
mov esi, eax
jmp 0x406dfa
cmp ebx, edi
jae 0x406e0a
mov eax, dword [esp + 0x98]
movzx ecx, byte [esp + 0x9c]
add ebx, 2
mov edx, eax
shl edx, cl
mov ecx, esi
shr edx, cl
lea edx, [ebp + edx*2]
movzx ecx, byte [edx]
movzx edx, byte [edx + 1]
add edx, dword [esp + 0x9c]
mov byte [ebx - 2], cl
mov ecx, edx
shl eax, cl
mov ecx, esi
shr eax, cl
lea eax, [ebp + eax*2]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
add eax, edx
mov byte [ebx - 1], cl
mov dword [esp + 0x9c], eax
lea eax, [esp + 0x98]
call fcn.004016a0
test eax, eax
je 0x406da8
mov eax, dword [esp + 0x7c]
mov edi, ebx
mov esi, dword [esp + 0x70]
neg eax
and eax, 0x1f
mov ebx, eax
jmp 0x406e58
cmp esi, edi
jbe 0x406ebc
mov edx, dword [esp + 0x9c]
mov eax, dword [esp + 0x98]
add edi, 1
mov ecx, edx
shl eax, cl
mov ecx, ebx
shr eax, cl
lea eax, [ebp + eax*2]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
add eax, edx
mov byte [edi - 1], cl
mov dword [esp + 0x9c], eax
lea eax, [esp + 0x98]
call fcn.004016a0
test eax, eax
je 0x406e20
mov eax, edi
cmp dword [esp + 0x70], edi
jbe 0x406ebc
mov ebx, dword [esp + 0x7c]
mov esi, dword [esp + 0x98]
mov edx, dword [esp + 0x9c]
neg ebx
and ebx, 0x1f
lea esi, [esi]
nop
mov ecx, edx
mov edi, esi
add eax, 1
shl edi, cl
mov ecx, ebx
shr edi, cl
lea ecx, [ebp + edi*2]
movzx edi, byte [ecx]
movzx ecx, byte [ecx + 1]
add edx, ecx
mov ecx, edi
mov byte [eax - 1], cl
cmp dword [esp + 0x70], eax
jne 0x406e90
mov dword [esp + 0x9c], edx
mov eax, dword [esp + 0x78]
mov ebx, dword [esp + 0x28]
lea edi, [eax - 3]
mov eax, dword [esp + 0x7c]
neg eax
and eax, 0x1f
mov esi, eax
jmp 0x406f2a
cmp ebx, edi
jae 0x406f3a
mov eax, dword [esp + 0xac]
movzx ecx, byte [esp + 0xb0]
add ebx, 2
mov edx, eax
shl edx, cl
mov ecx, esi
shr edx, cl
lea edx, [ebp + edx*2]
movzx ecx, byte [edx]
movzx edx, byte [edx + 1]
add edx, dword [esp + 0xb0]
mov byte [ebx - 2], cl
mov ecx, edx
shl eax, cl
mov ecx, esi
shr eax, cl
lea eax, [ebp + eax*2]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
add eax, edx
mov byte [ebx - 1], cl
mov dword [esp + 0xb0], eax
lea eax, [esp + 0xac]
call fcn.004016a0
test eax, eax
je 0x406ed8
mov eax, dword [esp + 0x7c]
mov edi, ebx
mov esi, dword [esp + 0x78]
neg eax
and eax, 0x1f
mov ebx, eax
jmp 0x406f88
cmp esi, edi
jbe 0x406fec
mov edx, dword [esp + 0xb0]
mov eax, dword [esp + 0xac]
add edi, 1
mov ecx, edx
shl eax, cl
mov ecx, ebx
shr eax, cl
lea eax, [ebp + eax*2]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
add eax, edx
mov byte [edi - 1], cl
mov dword [esp + 0xb0], eax
lea eax, [esp + 0xac]
call fcn.004016a0
test eax, eax
je 0x406f50
mov eax, edi
cmp dword [esp + 0x78], edi
jbe 0x406fec
mov ebx, dword [esp + 0x7c]
mov esi, dword [esp + 0xac]
mov edx, dword [esp + 0xb0]
neg ebx
and ebx, 0x1f
lea esi, [esi]
nop
mov ecx, edx
mov edi, esi
add eax, 1
shl edi, cl
mov ecx, ebx
shr edi, cl
lea ecx, [ebp + edi*2]
movzx edi, byte [ecx]
movzx ecx, byte [ecx + 1]
add edx, ecx
mov ecx, edi
mov byte [eax - 1], cl
cmp dword [esp + 0x78], eax
jne 0x406fc0
mov dword [esp + 0xb0], edx
mov ebx, dword [esp + 0x7c]
mov edi, dword [esp + 0x68]
mov esi, dword [esp + 0xc]
neg ebx
and ebx, 0x1f
jmp 0x407052
cmp edi, esi
jbe 0x407062
mov eax, dword [esp + 0xc0]
movzx ecx, byte [esp + 0xc4]
add esi, 2
mov edx, eax
shl edx, cl
mov ecx, ebx
shr edx, cl
lea edx, [ebp + edx*2]
movzx ecx, byte [edx]
movzx edx, byte [edx + 1]
add edx, dword [esp + 0xc4]
mov byte [esi - 2], cl
mov ecx, edx
shl eax, cl
mov ecx, ebx
shr eax, cl
lea eax, [ebp + eax*2]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
add eax, edx
mov byte [esi - 1], cl
mov dword [esp + 0xc4], eax
lea eax, [esp + 0xc0]
call fcn.004016a0
test eax, eax
je 0x407000
mov ebx, dword [esp + 0x7c]
mov edi, esi
mov esi, dword [esp + 0x80]
neg ebx
and ebx, 0x1f
jmp 0x4070b8
cmp esi, edi
jbe 0x40711f
mov edx, dword [esp + 0xc4]
mov eax, dword [esp + 0xc0]
add edi, 1
mov ecx, edx
shl eax, cl
mov ecx, ebx
shr eax, cl
lea eax, [ebp + eax*2]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
add eax, edx
mov byte [edi - 1], cl
mov dword [esp + 0xc4], eax
lea eax, [esp + 0xc0]
call fcn.004016a0
test eax, eax
je 0x407080
mov eax, edi
cmp dword [esp + 0x80], edi
jbe 0x40711f
mov ebx, dword [esp + 0x7c]
mov esi, dword [esp + 0xc0]
mov edx, dword [esp + 0xc4]
neg ebx
and ebx, 0x1f
lea esi, [esi]
mov ecx, edx
mov edi, esi
add eax, 1
shl edi, cl
mov ecx, ebx
shr edi, cl
lea ecx, [ebp + edi*2]
movzx edi, byte [ecx]
movzx ecx, byte [ecx + 1]
add edx, ecx
mov ecx, edi
mov byte [eax - 1], cl
cmp dword [esp + 0x80], eax
jne 0x4070f0
mov dword [esp + 0xc4], edx
mov edi, dword [esp + 0x40]
xor eax, eax
cmp edi, dword [esp + 0x8c]
je 0x407334
mov edi, dword [esp + 0xa4]
cmp dword [esp + 0xa0], edi
je 0x407322
xor eax, eax
mov edi, dword [esp + 0xb8]
cmp dword [esp + 0xb4], edi
jne 0x4065a0
cmp dword [esp + 0xb0], 0x20
jne 0x4065a0
mov edi, dword [esp + 0xcc]
cmp dword [esp + 0xc8], edi
jne 0x4065a0
cmp dword [esp + 0xc4], 0x20
jne 0x4065a0
test eax, eax
je 0x4065a0
mov eax, dword [esp + 0x30]
jmp 0x4065a5
lea eax, [ebx + ecx - 4]
mov dword [esp + 0x34], eax
mov dword [esp + 0x8c], eax
mov eax, dword [eax]
mov dword [esp + 0x84], eax
mov eax, 0xffffffff
test dl, dl
je 0x4065a5
bsr edx, edx
mov eax, 8
sub eax, edx
mov dword [esp + 8], eax
mov eax, ebx
jmp 0x406638
mov eax, 0xffffffb8
jmp 0x4065a5
mov dword [esp + 0x24], edi
mov edx, dword [esp + 0x20]
cmp dword [esp + 0x50], edx
jbe 0x407354
mov edi, dword [esp + 8]
cmp byte [esp + 0x6e], 0
mov dword [esp + 0xb0], eax
mov dword [esp + 0xc4], ebx
mov dword [esp + 0x88], edi
mov edi, dword [esp + 0x24]
mov dword [esp + 0x9c], edi
jne 0x4072f4
cmp byte [esp + 0x6c], 0
je 0x407243
mov eax, dword [esp + 0x38]
mov dword [esp + 0xb4], eax
cmp byte [esp + 0x6d], 0
je 0x407255
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xa0], eax
cmp byte [esp + 0x6f], 0
je 0x407272
mov eax, dword [esp + 0x64]
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x84], eax
cmp byte [esp + 0x6d], 0
je 0x407284
mov eax, dword [esp + 0x14]
mov dword [esp + 0x98], eax
cmp byte [esp + 0x6c], 0
je 0x407296
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xac], eax
cmp byte [esp + 0x6e], 0
jne 0x406c2f
jmp 0x406c3a
mov ecx, 3
jmp 0x406976
mov dword [esp + 0x64], esi
mov ecx, 3
jmp 0x40694f
mov edi, dword [esp + 8]
mov dword [esp + 0xb0], eax
mov dword [esp + 0xc4], ebx
mov dword [esp + 0x88], edi
mov edi, dword [esp + 0x24]
mov dword [esp + 0x9c], edi
mov eax, dword [esp + 0x20]
mov byte [esp + 0x6e], 1
mov dword [esp + 0xc8], eax
jmp 0x407231
mov eax, dword [esp + 0x70]
mov dword [esp + 0xc], esi
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x10], eax
jmp 0x406c3a
xor edx, edx
cmp dword [esp + 0x9c], 0x20
cmovne eax, edx
jmp 0x407148
xor eax, eax
cmp dword [esp + 0x88], 0x20
sete al
jmp 0x407132
mov dword [esp + 0x24], edi
mov byte [esp + 0x6c], 1
jmp 0x407202
mov edx, ebx
and ebx, 7
shr edx, 3
sub dword [esp + 0x20], edx
mov edi, dword [esp + 0x20]
mov edi, dword [edi]
mov dword [esp + 0x18], edi
jmp 0x406b9b
mov dword [esp + 0x24], edi
mov byte [esp + 0x6c], 1
jmp 0x406b9b