Function at 0x404d50
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x160
push esi
mov dword [ebp - 0x114], 0xffffffff
mov dword [ebp - 0xc8], 0xffffffff
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x108], 0
mov dword [ebp - 0x110], 0
lea eax, [ebp - 0xb8]
mov dword [ebp - 0xd0], eax
mov dword [ebp - 0xcc], 0
mov ecx, dword [ebp + 0x10]
add ecx, dword [ebp + 0x18]
mov dword [ebp - 0x11c], ecx
mov edx, dword [ebp - 0x11c]
sub edx, 1
mov dword [ebp - 0x118], edx
mov eax, dword [ebp + 8]
mov dword [ebp - 0xbc], eax
mov ecx, dword [ebp - 0xbc]
mov dword [ebp - 0x10c], ecx
mov edx, dword [ebp + 0x1c]
and edx, 0xffcf5a6f
test edx, edx
je 0x404df0
mov eax, 0xfffffffd
jmp 0x405ada
cmp dword [ebp - 0x10c], 0
je 0x404e0b
cmp dword [ebp + 0x10], 0
je 0x404e0b
cmp dword [ebp + 0x20], 0
jne 0x404e15
cmp dword [ebp + 0x24], 0
jle 0x404e15
mov eax, 0xfffffffe
jmp 0x405ada
cmp dword [ebp + 0x24], 0
jge 0x404e25
mov eax, 0xfffffff1
jmp 0x405ada
mov dword [ebp - 0x100], 0
mov eax, dword [ebp - 0xd0]
mov dword [eax + 4], 0x989680
mov ecx, dword [ebp - 0xd0]
mov dword [ecx + 8], 0x989680
mov edx, dword [ebp - 0xd0]
mov dword [edx + 0x6c], 0
mov eax, dword [ebp - 0xbc]
mov ecx, dword [eax + 0x20]
mov dword [ebp - 0x104], ecx
cmp dword [ebp + 0xc], 0
je 0x404f00
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
mov dword [ebp - 0x12c], eax
mov ecx, dword [ebp - 0x12c]
and ecx, 1
test ecx, ecx
je 0x404e93
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
mov dword [ebp - 0x100], eax
mov ecx, dword [ebp - 0x12c]
and ecx, 2
test ecx, ecx
je 0x404eaf
mov edx, dword [ebp - 0xd0]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 8]
mov dword [edx + 4], ecx
mov edx, dword [ebp - 0x12c]
and edx, 0x10
test edx, edx
je 0x404ecb
mov eax, dword [ebp - 0xd0]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
mov dword [eax + 8], edx
mov eax, dword [ebp - 0x12c]
and eax, 4
test eax, eax
je 0x404ee7
mov ecx, dword [ebp - 0xd0]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0xc]
mov dword [ecx + 0x6c], eax
mov ecx, dword [ebp - 0x12c]
and ecx, 8
test ecx, ecx
je 0x404f00
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x104], eax
cmp dword [ebp - 0x104], 0
jne 0x404f13
mov dword [ebp - 0x104], 0x420338
mov ecx, dword [ebp - 0x10c]
cmp dword [ecx], 0x50435245
je 0x404f6d
lea edx, [ebp - 0x38]
push edx
mov eax, dword [ebp - 0x100]
push eax
lea ecx, [ebp - 0xfc]
push ecx
mov edx, dword [ebp - 0x10c]
push edx
call fcn.00415690
add esp, 0x10
mov dword [ebp - 0x10c], eax
cmp dword [ebp - 0x10c], 0
jne 0x404f5b
mov eax, 0xfffffffc
jmp 0x405ada
cmp dword [ebp - 0x100], 0
je 0x404f6d
lea eax, [ebp - 0x38]
mov dword [ebp - 0x100], eax
mov ecx, dword [ebp - 0x10c]
mov edx, dword [ecx + 8]
or edx, dword [ebp + 0x1c]
and edx, 0x10
neg edx
sbb edx, edx
neg edx
mov dword [ebp - 0x128], edx
mov eax, dword [ebp - 0x10c]
mov ecx, dword [eax + 8]
and ecx, 0x10000000
neg ecx
sbb ecx, ecx
neg ecx
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x10c]
mov eax, dword [edx + 8]
and eax, 0x40000
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 0x120], eax
mov ecx, dword [ebp - 0x10c]
movzx edx, word [ecx + 0x18]
mov eax, dword [ebp - 0xbc]
add eax, edx
mov ecx, dword [ebp - 0x10c]
movzx edx, word [ecx + 0x1c]
mov ecx, dword [ebp - 0x10c]
movzx ecx, word [ecx + 0x1a]
imul edx, ecx
add eax, edx
mov edx, dword [ebp - 0xd0]
mov dword [edx + 0x48], eax
mov eax, dword [ebp - 0xd0]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 0x4c], ecx
mov edx, dword [ebp - 0xd0]
mov eax, dword [ebp + 0x18]
mov dword [edx + 0x64], eax
mov ecx, dword [ebp - 0xd0]
mov edx, dword [ecx + 0x4c]
add edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0xd0]
mov dword [eax + 0x50], edx
mov ecx, dword [ebp - 0xd0]
mov edx, dword [ecx + 0x50]
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x10c]
mov ecx, dword [eax + 8]
and ecx, 0x20
neg ecx
sbb ecx, ecx
neg ecx
mov edx, dword [ebp - 0xd0]
mov dword [edx + 0x38], ecx
mov eax, dword [ebp - 0x10c]
mov ecx, dword [eax + 8]
and ecx, 0x800
neg ecx
sbb ecx, ecx
neg ecx
mov edx, dword [ebp - 0xd0]
mov dword [edx + 0x34], ecx
mov eax, dword [ebp + 0x1c]
and eax, 0x80
neg eax
sbb eax, eax
neg eax
mov ecx, dword [ebp - 0xd0]
mov dword [ecx + 0x2c], eax
mov edx, dword [ebp + 0x1c]
and edx, 0x100
neg edx
sbb edx, edx
neg edx
mov eax, dword [ebp - 0xd0]
mov dword [eax + 0x30], edx
mov ecx, dword [ebp + 0x1c]
and ecx, 0x400
neg ecx
sbb ecx, ecx
neg ecx
mov edx, dword [ebp - 0xd0]
mov dword [edx + 0x3c], ecx
mov eax, dword [ebp + 0x1c]
and eax, 0x8000
neg eax
sbb eax, eax
neg eax
mov ecx, dword [ebp - 0xd0]
mov dword [ecx + 0x40], eax
mov edx, dword [ebp - 0xd0]
mov dword [edx + 0x44], 0
mov eax, dword [ebp - 0xd0]
mov dword [eax + 0x68], 0
mov ecx, dword [ebp - 0xd0]
mov edx, dword [ebp - 0x104]
mov dword [ecx + 0x20], edx
mov eax, dword [ebp - 0x104]
add eax, 0x340
mov ecx, dword [ebp - 0xd0]
mov dword [ecx + 0x24], eax
mov edx, dword [ebp + 0x1c]
and edx, 0x300000
test edx, edx
jne 0x405119
mov eax, dword [ebp - 0x10c]
mov ecx, dword [eax + 8]
mov dword [ebp - 0x158], ecx
jmp 0x405122
mov edx, dword [ebp + 0x1c]
mov dword [ebp - 0x158], edx
mov eax, dword [ebp - 0x158]
and eax, 0x300000
mov dword [ebp - 0x15c], eax
cmp dword [ebp - 0x15c], 0x100000
je 0x405160
cmp dword [ebp - 0x15c], 0x200000
je 0x405169
cmp dword [ebp - 0x15c], 0x300000
je 0x405172
mov dword [ebp - 0xc], 0xa
jmp 0x405179
mov dword [ebp - 0xc], 0xd
jmp 0x405179
mov dword [ebp - 0xc], 0xa
jmp 0x405179
mov dword [ebp - 0xc], 0xd0a
cmp dword [ebp - 0xc], 0xff
jle 0x4051b8
mov ecx, dword [ebp - 0xd0]
mov dword [ecx + 0x18], 2
mov edx, dword [ebp - 0xc]
sar edx, 8
and edx, 0xff
mov eax, dword [ebp - 0xd0]
mov byte [eax + 0x1c], dl
mov ecx, dword [ebp - 0xc]
and ecx, 0xff
mov edx, dword [ebp - 0xd0]
mov byte [edx + 0x1d], cl
jmp 0x4051d1
mov eax, dword [ebp - 0xd0]
mov dword [eax + 0x18], 1
mov ecx, dword [ebp - 0xd0]
mov dl, byte [ebp - 0xc]
mov byte [ecx + 0x1c], dl
mov eax, dword [ebp - 0xd0]
cmp dword [eax + 0x40], 0
je 0x4051fa
mov ecx, dword [ebp - 0x10c]
mov edx, dword [ecx + 8]
and edx, 0x80000000
test edx, edx
je 0x4051fa
mov eax, 0xfffffff3
jmp 0x405ada
mov eax, dword [ebp - 0xd0]
cmp dword [eax + 0x34], 0
je 0x40528c
mov ecx, dword [ebp + 0x1c]
and ecx, 0x2000
test ecx, ecx
jne 0x40528c
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
call fcn.00415480
add esp, 8
test eax, eax
jl 0x405235
mov eax, 0xfffffff6
jmp 0x405ada
cmp dword [ebp + 0x18], 0
jle 0x40528c
mov ecx, dword [ebp + 0x18]
cmp ecx, dword [ebp + 0x14]
jge 0x40528c
mov edx, dword [ebp + 0x10]
add edx, dword [ebp + 0x18]
movzx eax, byte [edx]
mov dword [ebp - 0x130], eax
cmp dword [ebp - 0x130], 0x7f
jle 0x40528c
mov ecx, dword [ebp - 0x130]
and ecx, 0xc0
mov dword [ebp - 0x130], ecx
cmp dword [ebp - 0x130], 0
je 0x40528c
cmp dword [ebp - 0x130], 0xc0
je 0x40528c
mov eax, 0xfffffff5
jmp 0x405ada
mov edx, dword [ebp - 0x10c]
mov eax, dword [edx + 8]
and eax, 7
mov dword [ebp - 0xc4], eax
mov eax, dword [ebp + 0x24]
cdq
mov ecx, 3
idiv ecx
mov eax, dword [ebp + 0x24]
sub eax, edx
mov dword [ebp - 0xc0], eax
mov ecx, dword [ebp - 0x10c]
movzx edx, word [ecx + 0x12]
test edx, edx
jle 0x405332
mov eax, dword [ebp - 0x10c]
movzx ecx, word [eax + 0x12]
mov eax, dword [ebp - 0xc0]
cdq
mov esi, 3
idiv esi
cmp ecx, eax
jl 0x405332
mov edx, dword [ebp - 0x10c]
movzx eax, word [edx + 0x12]
imul eax, eax, 3
add eax, 3
mov dword [ebp - 0xc0], eax
mov ecx, dword [ebp - 0xc0]
shl ecx, 2
push ecx
call dword [0x41fab0]
add esp, 4
mov edx, dword [ebp - 0xd0]
mov dword [edx + 0xc], eax
mov eax, dword [ebp - 0xd0]
cmp dword [eax + 0xc], 0
jne 0x405326
mov eax, 0xfffffffa
jmp 0x405ada
mov dword [ebp - 0x124], 1
jmp 0x40533e
mov ecx, dword [ebp - 0xd0]
mov edx, dword [ebp + 0x20]
mov dword [ecx + 0xc], edx
mov eax, dword [ebp - 0xd0]
mov ecx, dword [ebp - 0xc0]
mov dword [eax + 0x10], ecx
mov eax, dword [ebp - 0xc0]
shl eax, 1
cdq
mov ecx, 3
idiv ecx
mov edx, dword [ebp - 0xd0]
mov dword [edx + 0x14], eax
mov eax, dword [ebp - 0xd0]
mov dword [eax + 0x28], 0
mov ecx, dword [ebp - 0xd0]
mov dword [ecx + 0x60], 0xffffffff
mov edx, dword [ebp - 0x10c]
movzx eax, word [edx + 0x10]
lea ecx, [eax + eax + 2]
mov dword [ebp - 0xd4], ecx
mov edx, dword [ebp - 0xd4]
cmp edx, dword [ebp + 0x24]
jle 0x4053ab
mov eax, dword [ebp - 0xc0]
mov dword [ebp - 0xd4], eax
mov ecx, dword [ebp - 0xd0]
cmp dword [ecx + 0xc], 0
je 0x405419
mov edx, dword [ebp - 0xd0]
mov eax, dword [edx + 0xc]
mov ecx, dword [ebp - 0xc0]
lea edx, [eax + ecx*4]
mov dword [ebp - 0x138], edx
mov eax, dword [ebp - 0xd4]
cdq
sub eax, edx
sar eax, 1
shl eax, 2
mov ecx, dword [ebp - 0x138]
sub ecx, eax
add ecx, 4
mov dword [ebp - 0x134], ecx
mov edx, dword [ebp - 0x138]
sub edx, 4
mov dword [ebp - 0x138], edx
mov eax, dword [ebp - 0x138]
cmp eax, dword [ebp - 0x134]
jb 0x405419
mov ecx, dword [ebp - 0x138]
mov dword [ecx], 0xffffffff
jmp 0x4053ee
cmp dword [ebp - 0x128], 0
jne 0x4054bc
mov edx, dword [ebp - 0x10c]
mov eax, dword [edx + 8]
and eax, 0x40000000
test eax, eax
je 0x40548e
mov ecx, dword [ebp - 0x10c]
movzx edx, word [ecx + 0x14]
and edx, 0xff
mov dword [ebp - 0x114], edx
mov eax, dword [ebp - 0x10c]
movzx ecx, word [eax + 0x14]
and ecx, 0x100
neg ecx
sbb ecx, ecx
neg ecx
mov dword [ebp - 0x108], ecx
cmp dword [ebp - 0x108], 1
jne 0x40548c
mov edx, dword [ebp - 0xd0]
mov eax, dword [edx + 0x20]
mov ecx, dword [ebp - 0x114]
movzx edx, byte [eax + ecx]
mov dword [ebp - 0x114], edx
jmp 0x4054bc
cmp dword [ebp - 8], 0
jne 0x4054bc
cmp dword [ebp - 0x100], 0
je 0x4054bc
mov eax, dword [ebp - 0x100]
mov ecx, dword [eax + 4]
and ecx, 1
test ecx, ecx
je 0x4054bc
mov edx, dword [ebp - 0x100]
add edx, 8
mov dword [ebp - 0xcc], edx
mov eax, dword [ebp - 0x10c]
mov ecx, dword [eax + 8]
and ecx, 0x20000000
test ecx, ecx
je 0x405516
mov edx, dword [ebp - 0x10c]
movzx eax, word [edx + 0x16]
and eax, 0xff
mov dword [ebp - 0xc8], eax
mov ecx, dword [ebp - 0x10c]
movzx edx, word [ecx + 0x16]
and edx, 0x100
neg edx
sbb edx, edx
neg edx
mov dword [ebp - 0x110], edx
mov eax, dword [ebp - 0x104]
add eax, dword [ebp - 0xc8]
movzx ecx, byte [eax + 0x100]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x13c], edx
mov eax, dword [ebp - 0xd0]
cmp dword [eax + 0xc], 0
je 0x40557a
mov ecx, dword [ebp - 0xd0]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0x144], edx
mov eax, dword [ebp - 0xd4]
mov ecx, dword [ebp - 0x144]
lea edx, [ecx + eax*4]
mov dword [ebp - 0x140], edx
mov eax, dword [ebp - 0x144]
cmp eax, dword [ebp - 0x140]
jae 0x40557a
mov ecx, dword [ebp - 0x144]
mov dword [ecx], 0xffffffff
mov edx, dword [ebp - 0x144]
add edx, 4
mov dword [ebp - 0x144], edx
jmp 0x40554f
cmp dword [ebp - 0x120], 0
je 0x4055fb
mov eax, dword [ebp - 0x11c]
mov dword [ebp - 0x148], eax
mov ecx, dword [ebp - 0xd0]
mov edx, dword [ebp - 0x13c]
sub edx, dword [ecx + 0x18]
cmp dword [ebp - 0x148], edx
ja 0x4055f2
mov eax, dword [ebp - 0x148]
movzx ecx, byte [eax]
mov edx, dword [ebp - 0xd0]
movzx eax, byte [edx + 0x1c]
cmp ecx, eax
jne 0x4055e1
mov ecx, dword [ebp - 0xd0]
cmp dword [ecx + 0x18], 1
je 0x4055f2
mov edx, dword [ebp - 0x148]
movzx eax, byte [edx + 1]
mov ecx, dword [ebp - 0xd0]
movzx edx, byte [ecx + 0x1d]
cmp eax, edx
je 0x4055f2
mov eax, dword [ebp - 0x148]
add eax, 1
mov dword [ebp - 0x148], eax
jmp 0x40558f
mov ecx, dword [ebp - 0x148]
mov dword [ebp - 0x3c], ecx
cmp dword [ebp - 0x114], 0
jl 0x40567b
cmp dword [ebp - 0x108], 0
je 0x405649
mov edx, dword [ebp - 0x11c]
cmp edx, dword [ebp - 0x3c]
jae 0x405647
mov eax, dword [ebp - 0x11c]
movzx ecx, byte [eax]
mov edx, dword [ebp - 0xd0]
mov eax, dword [edx + 0x20]
movzx ecx, byte [eax + ecx]
cmp ecx, dword [ebp - 0x114]
je 0x405647
mov edx, dword [ebp - 0x11c]
add edx, 1
mov dword [ebp - 0x11c], edx
jmp 0x40560d
jmp 0x405676
mov eax, dword [ebp - 0x11c]
cmp eax, dword [ebp - 0x3c]
jae 0x405676
mov ecx, dword [ebp - 0x11c]
movzx edx, byte [ecx]
cmp edx, dword [ebp - 0x114]
je 0x405676
mov eax, dword [ebp - 0x11c]
add eax, 1
mov dword [ebp - 0x11c], eax
jmp 0x405649
jmp 0x40576e
cmp dword [ebp - 8], 0
je 0x40570d
mov ecx, dword [ebp - 0xd0]
mov edx, dword [ecx + 0x4c]
mov eax, dword [ebp - 0xd0]
add edx, dword [eax + 0x18]
add edx, dword [ebp + 0x18]
cmp dword [ebp - 0x11c], edx
jb 0x40570b
mov ecx, dword [ebp - 0x11c]
cmp ecx, dword [ebp - 0x3c]
ja 0x40570b
mov edx, dword [ebp - 0xd0]
mov eax, dword [ebp - 0x11c]
sub eax, dword [edx + 0x18]
movzx ecx, byte [eax]
mov edx, dword [ebp - 0xd0]
movzx eax, byte [edx + 0x1c]
cmp ecx, eax
jne 0x4056fa
mov ecx, dword [ebp - 0xd0]
cmp dword [ecx + 0x18], 1
je 0x40570b
mov edx, dword [ebp - 0xd0]
mov eax, dword [ebp - 0x11c]
sub eax, dword [edx + 0x18]
movzx ecx, byte [eax + 1]
mov edx, dword [ebp - 0xd0]
movzx eax, byte [edx + 0x1d]
cmp ecx, eax
je 0x40570b
mov ecx, dword [ebp - 0x11c]
add ecx, 1
mov dword [ebp - 0x11c], ecx
jmp 0x4056a2
jmp 0x40576e
cmp dword [ebp - 0xcc], 0
je 0x40576e
mov edx, dword [ebp - 0x11c]
cmp edx, dword [ebp - 0x3c]
jae 0x40576e
mov eax, dword [ebp - 0x11c]
movzx ecx, byte [eax]
mov dword [ebp - 0x14c], ecx
mov edx, dword [ebp - 0x14c]
shr edx, 3
mov eax, dword [ebp - 0xcc]
movzx edx, byte [eax + edx]
mov ecx, dword [ebp - 0x14c]
and ecx, 7
mov eax, 1
shl eax, cl
and edx, eax
test edx, edx
jne 0x40576a
mov ecx, dword [ebp - 0x11c]
add ecx, 1
mov dword [ebp - 0x11c], ecx
jmp 0x40576c
jmp 0x40576e
jmp 0x405716
mov edx, dword [ebp - 0x13c]
mov dword [ebp - 0x3c], edx
cmp dword [ebp - 0xc8], 0
jl 0x405890
mov eax, dword [ebp - 0x3c]
sub eax, dword [ebp - 0x11c]
cmp eax, 0x3e8
jge 0x405890
mov ecx, dword [ebp - 0xd0]
cmp dword [ecx + 0x40], 0
jne 0x405890
xor edx, edx
cmp dword [ebp - 0x114], 0
setge dl
mov eax, dword [ebp - 0x11c]
add eax, edx
mov dword [ebp - 0x150], eax
mov ecx, dword [ebp - 0x150]
cmp ecx, dword [ebp - 0x118]
jbe 0x405890
cmp dword [ebp - 0x110], 0
je 0x405834
mov edx, dword [ebp - 0x150]
cmp edx, dword [ebp - 0x3c]
jae 0x405832
mov eax, dword [ebp - 0x150]
movzx ecx, byte [eax]
mov dword [ebp - 0x154], ecx
mov edx, dword [ebp - 0x150]
add edx, 1
mov dword [ebp - 0x150], edx
mov eax, dword [ebp - 0x154]
cmp eax, dword [ebp - 0xc8]
je 0x40581f
mov ecx, dword [ebp - 0x154]
cmp ecx, dword [ebp - 0x10]
jne 0x405830
mov edx, dword [ebp - 0x150]
sub edx, 1
mov dword [ebp - 0x150], edx
jmp 0x405832
jmp 0x4057dd
jmp 0x405874
mov eax, dword [ebp - 0x150]
cmp eax, dword [ebp - 0x3c]
jae 0x405874
mov ecx, dword [ebp - 0x150]
movzx edx, byte [ecx]
mov eax, dword [ebp - 0xc8]
mov ecx, dword [ebp - 0x150]
add ecx, 1
mov dword [ebp - 0x150], ecx
cmp edx, eax
jne 0x405872
mov edx, dword [ebp - 0x150]
sub edx, 1
mov dword [ebp - 0x150], edx
jmp 0x405874
jmp 0x405834
mov eax, dword [ebp - 0x150]
cmp eax, dword [ebp - 0x3c]
jb 0x405884
jmp 0x405a9c
mov ecx, dword [ebp - 0x150]
mov dword [ebp - 0x118], ecx
mov edx, dword [ebp - 0xd0]
mov eax, dword [ebp - 0x11c]
mov dword [edx + 0x54], eax
mov ecx, dword [ebp - 0xd0]
mov dword [ecx], 0
push 0
push 2
push 0
mov edx, dword [ebp - 0xc4]
push edx
mov eax, dword [ebp - 0xd0]
push eax
push 2
mov ecx, dword [ebp - 0xd0]
mov edx, dword [ecx + 0x48]
push edx
mov eax, dword [ebp - 0x11c]
push eax
call fcn.00405adf
add esp, 0x20
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40599d
cmp dword [ebp - 0x120], 0
je 0x40594a
mov ecx, dword [ebp - 0xd0]
mov edx, dword [ebp - 0xd0]
mov eax, dword [ecx + 0x50]
sub eax, dword [edx + 0x18]
cmp dword [ebp - 0x11c], eax
ja 0x40594a
mov ecx, dword [ebp - 0x11c]
movzx edx, byte [ecx]
mov eax, dword [ebp - 0xd0]
movzx ecx, byte [eax + 0x1c]
cmp edx, ecx
jne 0x40594a
mov edx, dword [ebp - 0xd0]
cmp dword [edx + 0x18], 1
je 0x405945
mov eax, dword [ebp - 0x11c]
movzx ecx, byte [eax + 1]
mov edx, dword [ebp - 0xd0]
movzx eax, byte [edx + 0x1d]
cmp ecx, eax
jne 0x40594a
jmp 0x405a9c
mov ecx, dword [ebp - 0x11c]
add ecx, 1
mov dword [ebp - 0x11c], ecx
mov edx, dword [ebp - 0xd0]
cmp dword [edx + 0x34], 0
je 0x405998
mov eax, dword [ebp - 0x11c]
cmp eax, dword [ebp - 0x3c]
jae 0x405998
mov ecx, dword [ebp - 0x11c]
movzx edx, byte [ecx]
and edx, 0xc0
cmp edx, 0x80
jne 0x405998
mov eax, dword [ebp - 0x11c]
add eax, 1
mov dword [ebp - 0x11c], eax
jmp 0x405965
jmp 0x405a84
cmp dword [ebp - 4], 1
je 0x4059ab
mov eax, dword [ebp - 4]
jmp 0x405ada
cmp dword [ebp - 0x124], 0
je 0x405a0f
cmp dword [ebp + 0x24], 4
jl 0x4059e1
mov ecx, dword [ebp + 0x24]
lea edx, [ecx*4 - 8]
push edx
mov eax, dword [ebp - 0xd0]
mov ecx, dword [eax + 0xc]
add ecx, 8
push ecx
mov edx, dword [ebp + 0x20]
add edx, 8
push edx
call fcn.00416930
add esp, 0xc
mov eax, dword [ebp - 0xd0]
mov ecx, dword [eax + 0x5c]
cmp ecx, dword [ebp + 0x24]
jle 0x4059fc
mov edx, dword [ebp - 0xd0]
mov dword [edx + 0x28], 1
mov eax, dword [ebp - 0xd0]
mov ecx, dword [eax + 0xc]
push ecx
call dword [0x41fab4]
add esp, 4
mov edx, dword [ebp - 0xd0]
cmp dword [edx + 0x28], 0
je 0x405a27
mov dword [ebp - 0x160], 0
jmp 0x405a3b
mov eax, dword [ebp - 0xd0]
mov eax, dword [eax + 0x5c]
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x160], eax
mov ecx, dword [ebp - 0x160]
mov dword [ebp - 4], ecx
cmp dword [ebp + 0x24], 2
jge 0x405a53
mov dword [ebp - 4], 0
jmp 0x405a7f
mov edx, dword [ebp - 0xd0]
mov eax, dword [ebp - 0x11c]
sub eax, dword [edx + 0x4c]
mov ecx, dword [ebp + 0x20]
mov dword [ecx], eax
mov edx, dword [ebp - 0xd0]
mov eax, dword [ebp - 0xd0]
mov ecx, dword [edx + 0x58]
sub ecx, dword [eax + 0x4c]
mov edx, dword [ebp + 0x20]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 4]
jmp 0x405ada
cmp dword [ebp - 0x128], 0
jne 0x405a9c
mov eax, dword [ebp - 0x11c]
cmp eax, dword [ebp - 0x3c]
jbe 0x405516
cmp dword [ebp - 0x124], 0
je 0x405ab8
mov ecx, dword [ebp - 0xd0]
mov edx, dword [ecx + 0xc]
push edx
call dword [0x41fab4]
add esp, 4
mov eax, dword [ebp - 0xd0]
cmp dword [eax + 0x40], 0
je 0x405ad7
mov ecx, dword [ebp - 0xd0]
cmp dword [ecx + 0x44], 0
je 0x405ad7
mov eax, 0xfffffff4
jmp 0x405ada
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret