Function at 0x403640
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffa28
push ebx
push esi
push edi
mov ebx, dword [ebp + 0x20]
mov esi, dword [ebp + 0x10]
mov eax, 0x4c6634
call fcn.0049fef4
xor edx, edx
lea edi, [ebp - 0x3d4]
mov dword [ebp - 0x60], edx
mov ecx, 0x80
mov word [ebp - 0x66], 0
push esi
mov esi, 0x4c3748
rep movsd dword es:[edi], dword [esi]
pop esi
lea edi, [ebp - 0x5d4]
push esi
mov esi, 0x4c3948
mov ecx, 0x80
rep movsd dword es:[edi], dword [esi]
cmp dword [ebp + 0x14], 0x5000
pop esi
jle 0x403796
mov eax, dword [ebp + 0x14]
mov ecx, 5
cdq
idiv ecx
cmp edx, 4
jne 0x403796
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x1df0]
add edx, 0xfffff831
mov dword [ebp - 0x90], edx
mov ecx, dword [ebp + 8]
push ecx
call fcn.004045a8
pop ecx
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0x90]
add eax, 0xaa62e
mov ecx, 0x186a0
cdq
idiv ecx
mov dword [ebp - 0x94], edx
mov eax, dword [ebp - 0x94]
add eax, 0x7d6
mov dword [ebp - 0x5d8], eax
fild dword [ebp - 0x5d8]
fmul qword [0x404584]
fld xword [0x40458c]
fmulp st(1)
fstp dword [ebp - 0x98]
fld dword [ebp - 0x98]
call fcn.004a6bd0
mov dword [ebp - 0x94], eax
fild dword [ebp - 0x94]
fsubr dword [ebp - 0x98]
mov eax, dword [ebp - 0x94]
mov ecx, 5
cdq
idiv ecx
mov dword [ebp - 0x5d8], edx
fild dword [ebp - 0x5d8]
faddp st(1)
fstp dword [ebp - 0x98]
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x98]
mov dword [eax + 0x3e8], edx
fld dword [ebp - 0x98]
fmul dword [ebp - 0x98]
fmul dword [ebp - 0x98]
fld dword [ebp - 0x98]
fmul dword [ebp - 0x98]
faddp st(1)
fadd dword [ebp - 0x98]
mov ecx, dword [ebp + 8]
fstp dword [ecx + 0x3ec]
mov eax, dword [ebp + 0x18]
sar eax, 1
jns 0x4037a0
adc eax, 0
mov dword [ebp - 0x70], eax
mov edx, dword [ebp - 0x70]
add edx, edx
push edx
call fcn.0049f2bc
pop ecx
mov dword [ebp - 0x5c], eax
mov dl, 1
mov eax, dword [0x48919c]
call fcn.004035a8
mov dword [ebp - 0x9c], eax
mov dl, 1
mov eax, dword [0x48919c]
call fcn.004035a8
mov dword [ebp - 0xa0], eax
cmp dword [ebp + 0x14], 0x5000
jle 0x4037f9
mov eax, dword [ebp + 0x14]
mov ecx, 5
cdq
idiv ecx
cmp edx, 4
jne 0x4037f9
mov eax, dword [ebp + 8]
push eax
call fcn.00404714
pop ecx
cmp dword [ebp + 0x1c], 1
je 0x403809
cmp dword [ebp + 0x1c], 0xa
jne 0x403b27
mov ecx, dword [ebp + 0x14]
mov edx, esi
mov eax, dword [ebp - 0x9c]
call fcn.0048c0f4
cmp dword [ebp + 0x14], 0x400
jle 0x403961
cmp ebx, 0xffffffff
jle 0x403961
mov edx, dword [ebp + 8]
mov esi, ebx
shl esi, 6
lea eax, [ebp - 0x1ac]
mov ecx, dword [edx + 0xaec]
add esi, ebx
add ecx, 0xffffec61
mov dword [ebp - 0x74], ecx
add esi, dword [ebp - 0x74]
push 0x41
push esi
push eax
call fcn.0049fa50
add esp, 0xc
lea edx, [ebp + 0x24]
lea ecx, [ebp - 0x1ac]
push 4
push edx
push 0x41
push ecx
mov eax, dword [ebp + 8]
push eax
call fcn.0040483c
add esp, 0x14
push 0x4c3b54
lea edx, [ebp - 0x1ac]
push edx
call fcn.0043bbe0
add esp, 8
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xaf0]
add eax, 0xffffff30
mov dword [ebp - 0x74], eax
push 0x4c3b48
mov edx, dword [ebp - 0x74]
push edx
call fcn.0043bbe0
add esp, 8
push 0x4c3b4c
push 0x4c52cc
call fcn.0043bda8
add esp, 8
mov ecx, dword [0x4c3b48]
mov eax, dword [0x4c3b4c]
mov edx, dword [0x4c3b54]
push 0x4c3b50
push ecx
push eax
push edx
call fcn.00435a94
add esp, 0x10
mov ecx, dword [0x4c3b50]
push ecx
lea eax, [ebp - 0x1ac]
push eax
call fcn.0043b788
add esp, 8
lea edx, [ebp - 0x1ac]
push edx
call fcn.0049fbf4
pop ecx
mov dword [ebp - 0x74], eax
lea ecx, [ebp - 0x74]
lea eax, [ebp - 0x1ac]
push ecx
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.0040486c
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040508c
and eax, 0xff
mov edx, 1
sub edx, eax
mov eax, dword [ebp - 0x9c]
shl edx, 2
pop ecx
lea edx, [edx + edx*4]
lea edx, [edx + edx*4]
add edx, 0x68
call fcn.0048c040
mov eax, dword [ebp - 0x9c]
lea edx, [ebp - 0x1ab]
mov ecx, 0x1d
mov ebx, dword [eax]
call dword [ebx + 8]
cmp dword [ebp + 0x14], 0x5000
jle 0x4039cc
mov eax, dword [ebp + 0x14]
mov ecx, 5
cdq
idiv ecx
cmp edx, 4
jne 0x4039cc
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 8]
fld dword [eax + 0x3f0]
fmul dword [edx + 0x3f0]
fmul dword [ecx + 0x3f0]
fld xword [0x404598]
fmulp st(1)
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 8]
fld dword [eax + 0x3e8]
fmul dword [edx + 0x3f0]
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
fmul dword [ecx + 0x3f0]
faddp st(1)
fadd dword [eax + 0x3f0]
fstp dword [edx + 0x3f0]
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x638], 0
jle 0x404139
cmp dword [ebp + 0x14], 0x2800
jle 0x404139
mov edx, 4
mov eax, dword [ebp - 0x9c]
call fcn.0048c040
mov eax, dword [ebp - 0x9c]
lea edx, [ebp - 0x1c0]
mov ecx, 0x14
mov ebx, dword [eax]
call dword [ebx + 4]
mov edx, dword [ebp + 0x14]
sar edx, 1
jns 0x403a19
adc edx, 0
mov eax, dword [ebp - 0x9c]
call fcn.0048c040
mov eax, dword [ebp - 0x9c]
lea edx, [ebp - 0x1d4]
mov ecx, 0x14
mov ebx, dword [eax]
call dword [ebx + 4]
mov eax, dword [ebp + 8]
cmp dword [eax + 0x638], 1
jne 0x403aaa
push 0x15
push 0
lea edx, [ebp - 0x1ac]
push edx
call fcn.0049fac0
mov ecx, dword [ebp + 8]
add esp, 0xc
lea edx, [ebp - 0x1ac]
mov eax, dword [ecx + 0x63c]
push eax
push 0x4c52d2
push edx
call fcn.004a3230
add esp, 0xc
xor ecx, ecx
mov dword [ebp - 0x74], ecx
lea eax, [ebp - 0x1c0]
lea ecx, [ebp - 0x1d4]
mov edx, 0x14
sub edx, dword [ebp - 0x74]
mov dl, byte [ebp + edx - 0x1ac]
xor dl, byte [ecx]
xor dl, byte [eax]
inc eax
mov byte [ecx], dl
inc ecx
inc dword [ebp - 0x74]
cmp dword [ebp - 0x74], 0x14
jl 0x403a88
jmp 0x403aea
mov eax, dword [ebp + 8]
cmp dword [eax + 0x638], 2
jne 0x403aea
xor ecx, ecx
lea eax, [ebp - 0x1d4]
mov dword [ebp - 0x74], ecx
lea ecx, [ebp - 0x1c0]
mov edx, 0x14
mov ebx, dword [ebp + 8]
sub edx, dword [ebp - 0x74]
mov dl, byte [ebx + edx + 0x640]
xor dl, byte [eax]
xor dl, byte [ecx]
inc ecx
mov byte [eax], dl
inc eax
inc dword [ebp - 0x74]
cmp dword [ebp - 0x74], 0x14
jl 0x403ac7
mov edx, dword [ebp + 0x14]
sar edx, 1
jns 0x403af4
adc edx, 0
mov eax, dword [ebp - 0x9c]
call fcn.0048c040
mov eax, dword [ebp - 0x9c]
lea edx, [ebp - 0x1d4]
mov ecx, 0x14
mov ebx, dword [eax]
call dword [ebx + 8]
xor edx, edx
mov eax, dword [ebp - 0x9c]
call fcn.0048c040
jmp 0x404139
cmp dword [ebp + 0x1c], 2
je 0x403b43
cmp dword [ebp + 0x1c], 3
je 0x403b43
cmp dword [ebp + 0x1c], 0x14
je 0x403b43
cmp dword [ebp + 0x1c], 0x1e
jne 0x404139
mov dl, 1
mov eax, dword [0x48919c]
call fcn.004035a8
mov dword [ebp - 0xa8], eax
mov eax, esi
lea edx, [ebp - 0x64]
mov ecx, 4
mov edi, dword [eax]
call dword [edi + 4]
mov ecx, dword [ebp + 0x14]
sub ecx, 4
mov edx, esi
mov eax, dword [ebp - 0xa8]
call fcn.0048c0f4
cmp dword [ebp + 0x14], 0x400
jle 0x403cdf
cmp ebx, 0xffffffff
jle 0x403cdf
mov eax, dword [ebp + 8]
mov esi, ebx
shl esi, 6
add esi, ebx
mov edx, dword [eax + 0xaec]
add edx, 0xffffec61
lea eax, [ebp - 0x1ac]
mov dword [ebp - 0x74], edx
add esi, dword [ebp - 0x74]
push 0x41
push esi
push eax
call fcn.0049fa50
add esp, 0xc
lea edx, [ebp + 0x24]
lea ecx, [ebp - 0x1ac]
push 4
push edx
push 0x41
push ecx
mov eax, dword [ebp + 8]
push eax
call fcn.0040483c
add esp, 0x14
xor edx, edx
mov dword [0x4c3b48], edx
xor ecx, ecx
mov dword [0x4c3b4c], ecx
xor eax, eax
mov dword [0x4c3b50], eax
xor edx, edx
mov dword [0x4c3b54], edx
push 0x4c3b54
lea ecx, [ebp - 0x1ac]
push ecx
call fcn.0043bbe0
add esp, 8
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0xaf0]
add edx, 0xffffff30
mov dword [ebp - 0x74], edx
push 0x4c3b48
mov ecx, dword [ebp - 0x74]
push ecx
call fcn.0043bbe0
add esp, 8
push 0x4c3b4c
push 0x4c52d5
call fcn.0043bda8
add esp, 8
mov eax, dword [0x4c3b48]
mov edx, dword [0x4c3b4c]
mov ecx, dword [0x4c3b54]
push 0x4c3b50
push eax
push edx
push ecx
call fcn.00435a94
add esp, 0x10
mov eax, dword [0x4c3b50]
push eax
lea edx, [ebp - 0x1ac]
push edx
call fcn.0043b788
add esp, 8
lea ecx, [ebp - 0x1ac]
push ecx
call fcn.0049fbf4
pop ecx
mov dword [ebp - 0x74], eax
lea eax, [ebp - 0x74]
lea edx, [ebp - 0x1ac]
push eax
push edx
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040486c
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
call fcn.0040508c
pop ecx
xor edx, edx
mov dl, al
mov ecx, 1
sub ecx, edx
mov eax, dword [ebp - 0xa8]
mov edx, ecx
shl edx, 2
lea edx, [edx + edx*4]
lea edx, [edx + edx*4]
add edx, 0x64
call fcn.0048c040
mov eax, dword [ebp - 0xa8]
lea edx, [ebp - 0x1ab]
mov ecx, 0x1d
mov ebx, dword [eax]
call dword [ebx + 8]
cmp dword [ebp + 0x14], 0x2800
jle 0x403d90
xor edx, edx
mov eax, dword [ebp - 0xa8]
call fcn.0048c040
mov eax, dword [ebp - 0xa8]
lea edx, [ebp - 0x1ac]
mov ecx, 0xc8
mov ebx, dword [eax]
call dword [ebx + 4]
xor eax, eax
lea ecx, [ebp - 0x1ac]
mov dword [ebp - 0x74], eax
mov edx, 0xc7
sub edx, dword [ebp - 0x74]
mov al, byte [ebp + edx - 0x1ac]
xor byte [ecx], al
inc dword [ebp - 0x74]
inc ecx
cmp dword [ebp - 0x74], 0x64
jl 0x403d1a
mov eax, dword [ebp + 0x14]
mov ecx, 0x32
cdq
idiv ecx
mov eax, dword [ebp + 8]
mov dl, byte [eax + edx + 0x3a4]
xor byte [ebp - 0x17a], dl
cmp dword [ebp + 0x14], 0xc800
jle 0x403d68
xor edx, edx
mov eax, dword [ebp - 0xa8]
call fcn.0048c040
jmp 0x403d75
xor edx, edx
mov eax, dword [ebp - 0xa8]
call fcn.0048c040
mov eax, dword [ebp - 0xa8]
lea edx, [ebp - 0x1ac]
mov ecx, 0x64
mov ebx, dword [eax]
call dword [ebx + 8]
jmp 0x403e4a
cmp dword [ebp + 0x14], 0x1400
jle 0x403e4a
cmp dword [ebp + 0x14], 0x2800
jge 0x403e4a
xor edx, edx
mov eax, dword [ebp - 0xa8]
call fcn.0048c040
mov eax, dword [ebp - 0xa8]
lea edx, [ebp - 0x1ac]
mov ecx, 0xa
mov ebx, dword [eax]
call dword [ebx + 4]
xor eax, eax
lea ecx, [ebp - 0x1ac]
mov dword [ebp - 0x74], eax
mov eax, dword [ebp + 0x14]
add eax, dword [ebp - 0x74]
mov ebx, 0x32
cdq
idiv ebx
mov eax, dword [ebp + 8]
mov dl, byte [eax + edx + 0x3a4]
xor byte [ecx], dl
inc dword [ebp - 0x74]
inc ecx
cmp dword [ebp - 0x74], 0xa
jl 0x403dd8
xor edx, edx
mov eax, dword [ebp - 0xa8]
call fcn.0048c040
mov ecx, dword [ebp + 8]
mov esi, dword [ecx + 0xae4]
add esi, 0x4e66
xor eax, eax
mov dword [ebp - 0x74], eax
lea eax, [ebp - 0x1a9]
mov ecx, esi
mov dl, byte [ecx]
inc ecx
xor byte [eax], dl
inc dword [ebp - 0x74]
inc eax
cmp dword [ebp - 0x74], 5
jl 0x403e25
mov eax, dword [ebp - 0xa8]
lea edx, [ebp - 0x1ac]
mov ecx, 0xa
mov ebx, dword [eax]
call dword [ebx + 8]
mov eax, dword [ebp + 8]
cmp dword [eax + 0x638], 0
jle 0x403fa3
cmp dword [ebp + 0x14], 0x2800
jle 0x403fa3
xor edx, edx
mov eax, dword [ebp - 0xa8]
call fcn.0048c040
mov eax, dword [ebp - 0xa8]
lea edx, [ebp - 0x1c0]
mov ecx, 0x14
mov ebx, dword [eax]
call dword [ebx + 4]
mov edx, dword [ebp + 0x14]
sar edx, 1
jns 0x403e94
adc edx, 0
sub edx, 4
mov eax, dword [ebp - 0xa8]
call fcn.0048c040
mov eax, dword [ebp - 0xa8]
lea edx, [ebp - 0x1d4]
mov ecx, 0x14
mov ebx, dword [eax]
call dword [ebx + 4]
mov eax, dword [ebp + 8]
cmp dword [eax + 0x638], 1
jne 0x403f28
push 0x15
push 0
lea edx, [ebp - 0x1ac]
push edx
call fcn.0049fac0
mov ecx, dword [ebp + 8]
add esp, 0xc
lea edx, [ebp - 0x1ac]
mov eax, dword [ecx + 0x63c]
push eax
push 0x4c52db
push edx
call fcn.004a3230
add esp, 0xc
xor ecx, ecx
mov dword [ebp - 0x74], ecx
lea ecx, [ebp - 0x1c0]
lea eax, [ebp - 0x1d4]
mov edx, 0x14
sub edx, dword [ebp - 0x74]
mov dl, byte [ebp + edx - 0x1ac]
xor dl, byte [eax]
xor dl, byte [ecx]
inc ecx
mov byte [eax], dl
inc eax
inc dword [ebp - 0x74]
cmp dword [ebp - 0x74], 0x14
jl 0x403f06
jmp 0x403f68
mov eax, dword [ebp + 8]
cmp dword [eax + 0x638], 2
jne 0x403f68
xor ecx, ecx
lea eax, [ebp - 0x1c0]
mov dword [ebp - 0x74], ecx
lea ecx, [ebp - 0x1d4]
mov edx, 0x14
mov ebx, dword [ebp + 8]
sub edx, dword [ebp - 0x74]
mov dl, byte [ebx + edx + 0x640]
xor dl, byte [ecx]
xor dl, byte [eax]
inc eax
mov byte [ecx], dl
inc ecx
inc dword [ebp - 0x74]
cmp dword [ebp - 0x74], 0x14
jl 0x403f45
mov edx, dword [ebp + 0x14]
sar edx, 1
jns 0x403f72
adc edx, 0
sub edx, 4
mov eax, dword [ebp - 0xa8]
call fcn.0048c040
mov eax, dword [ebp - 0xa8]
lea edx, [ebp - 0x1d4]
mov ecx, 0x14
mov ebx, dword [eax]
call dword [ebx + 8]
xor edx, edx
mov eax, dword [ebp - 0xa8]
call fcn.0048c040
mov eax, dword [ebp - 0x9c]
mov edx, dword [ebp - 0x64]
inc edx
mov ecx, dword [eax]
call dword [ecx]
mov eax, dword [ebp - 0x9c]
call fcn.0048c04c
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp - 0xa8]
call fcn.0048c04c
push eax
lea eax, [ebp - 0xa4]
mov edx, dword [ebp - 0xa8]
mov ecx, dword [edx + 4]
push ecx
push eax
mov edx, dword [ebp - 0x9c]
mov ecx, dword [edx + 4]
push ecx
call fcn.00430a00
add esp, 0x10
test eax, eax
je 0x4040a3
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x404029
mov edx, dword [ebp - 8]
mov ecx, dword [edx]
mov dword [ebp - 4], ecx
mov word [ebp - 0x48], 0x14
mov edx, 3
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x48], 8
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x404059
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx]
mov dword [ebp - 0xc], ecx
mov word [ebp - 0x48], 0x2c
mov edx, 3
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x48], 0x20
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x404089
mov edx, dword [ebp - 0x18]
mov ecx, dword [edx]
mov dword [ebp - 0x14], ecx
mov word [ebp - 0x48], 0x44
mov edx, 3
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x48], 0x38
mov eax, dword [ebp + 8]
inc dword [eax + 0x1cbc]
xor eax, eax
mov edx, dword [ebp - 0x58]
mov dword fs:[0], edx
jmp 0x40457d
cmp dword [ebp + 0x14], 0x5000
jle 0x40410e
mov eax, dword [ebp + 0x14]
mov ecx, 5
cdq
idiv ecx
cmp edx, 4
jne 0x40410e
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 8]
fld dword [eax + 0x3f0]
fmul dword [edx + 0x3f0]
fmul dword [ecx + 0x3f0]
fld xword [0x404598]
fmulp st(1)
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 8]
fld dword [eax + 0x3e8]
fmul dword [edx + 0x3f0]
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
fmul dword [ecx + 0x3f0]
faddp st(1)
fadd dword [eax + 0x3f0]
fstp dword [edx + 0x3f0]
mov ebx, dword [ebp - 0xa8]
mov dword [ebp - 0x20], ebx
test ebx, ebx
je 0x404139
mov eax, dword [ebx]
mov dword [ebp - 0x1c], eax
mov word [ebp - 0x48], 0x5c
mov edx, 3
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x48], 0x50
xor edx, edx
mov eax, dword [ebp - 0x9c]
call fcn.0048c040
mov edx, dword [ebp - 0x9c]
mov ebx, dword [edx + 4]
mov eax, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x60]
mov cx, word [ebx]
mov word [eax + edx*2], cx
inc dword [ebp - 0x60]
cmp dword [ebp + 0x14], 0x5400
jle 0x404193
mov eax, dword [ebp + 0x14]
mov ecx, 5
cdq
idiv ecx
cmp edx, 4
jne 0x404193
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 8]
fld dword [eax + 0x3f0]
fadd dword [edx + 0x3ec]
fstp dword [ecx + 0x3f4]
mov eax, dword [ebp - 0x9c]
call fcn.0048c04c
mov esi, eax
sar esi, 1
jns 0x4041a7
adc esi, 0
lea eax, [esi - 3]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x64], 1
mov edx, dword [ebp - 0x64]
cmp edx, dword [ebp - 0x6c]
jge 0x404325
mov ecx, dword [ebp - 0x64]
cmp word [ebx + ecx*2], 0
jne 0x404295
mov eax, dword [ebp - 0x64]
cmp word [ebx + eax*2 + 2], 0
jne 0x404295
mov edx, dword [ebp - 0x64]
cmp word [ebx + edx*2 + 4], 0
je 0x404295
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x60]
lea edx, [edx + ecx*2]
jmp 0x40420b
mov ecx, dword [ebp - 0x64]
mov cx, word [ebx + ecx*2 + 6]
mov word [edx], cx
add edx, 2
inc dword [ebp - 0x60]
inc eax
mov ecx, dword [ebp - 0x64]
movzx ecx, word [ebx + ecx*2 + 4]
cmp eax, ecx
jl 0x4041f9
add dword [ebp - 0x64], 3
cmp dword [ebp - 0x64], 0x64
jne 0x404316
cmp dword [ebp + 0x14], 0x5800
jle 0x404316
mov eax, dword [ebp + 0x14]
mov ecx, 5
cdq
idiv ecx
add edx, 0xfffffffc
test edx, edx
setne al
and eax, 1
mov byte [ebp - 0xa9], al
xor edx, edx
mov dl, byte [ebp - 0xa9]
cmp edx, 1
sbb eax, eax
neg eax
mov byte [ebp - 0xa9], al
mov edx, dword [ebp + 8]
fld dword [edx + 0x3f4]
fmul dword [0x4045a4]
xor ecx, ecx
mov cl, byte [ebp - 0xa9]
mov dword [ebp - 0x5d8], ecx
fild dword [ebp - 0x5d8]
fmulp st(1)
call fcn.004a6bd0
add dword [ebp - 0x60], eax
jmp 0x404316
mov edx, dword [ebp - 0x64]
mov eax, dword [ebp - 0x5c]
mov cx, word [ebx + edx*2]
mov edx, dword [ebp - 0x60]
mov word [eax + edx*2], cx
inc dword [ebp - 0x60]
cmp dword [ebp - 0x64], 0x64
jne 0x404316
cmp dword [ebp + 0x14], 0x5800
jle 0x404316
mov eax, dword [ebp + 0x14]
mov ecx, 5
cdq
idiv ecx
add edx, 0xfffffffc
test edx, edx
setne al
and eax, 1
mov byte [ebp - 0xaa], al
xor edx, edx
mov dl, byte [ebp - 0xaa]
cmp edx, 1
sbb ecx, ecx
neg ecx
mov byte [ebp - 0xaa], cl
mov eax, dword [ebp + 8]
fld dword [eax + 0x3f4]
fmul dword [0x4045a4]
xor edx, edx
mov dl, byte [ebp - 0xaa]
mov dword [ebp - 0x5d8], edx
fild dword [ebp - 0x5d8]
fmulp st(1)
call fcn.004a6bd0
add dword [ebp - 0x60], eax
inc dword [ebp - 0x64]
mov edx, dword [ebp - 0x64]
cmp edx, dword [ebp - 0x6c]
jl 0x4041c0
mov ecx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x60]
lea eax, [ecx + eax*2]
cmp esi, dword [ebp - 0x64]
jle 0x40434b
mov edx, dword [ebp - 0x64]
mov cx, word [ebx + edx*2]
mov word [eax], cx
inc dword [ebp - 0x60]
add eax, 2
inc dword [ebp - 0x64]
cmp esi, dword [ebp - 0x64]
jg 0x404333
mov eax, dword [ebp - 0x60]
cmp eax, dword [ebp - 0x70]
jle 0x404391
mov word [ebp - 0x48], 0x68
mov edx, 0x4c52de
lea eax, [ebp - 0x24]
call fcn.004adb50
inc dword [ebp - 0x3c]
mov eax, dword [eax]
call fcn.00470060
dec dword [ebp - 0x3c]
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.004adc4c
xor eax, eax
mov edx, dword [ebp - 0x58]
mov dword fs:[0], edx
jmp 0x40457d
mov eax, dword [ebp + 0x1c]
mov ecx, 0xa
cdq
idiv ecx
test eax, eax
jle 0x4044e3
mov esi, dword [ebp - 0x5c]
push 2
push esi
lea eax, [ebp - 0x76]
push eax
call fcn.0049fa50
add esp, 0xc
push 2
lea edx, [esi + 2]
push edx
lea ecx, [ebp - 0x78]
push ecx
call fcn.0049fa50
add esp, 0xc
push 2
lea eax, [esi + 4]
push eax
lea edx, [ebp - 0x8a]
push edx
call fcn.0049fa50
add esp, 0xc
push 2
lea ecx, [esi + 6]
push ecx
lea eax, [ebp - 0x8c]
push eax
call fcn.0049fa50
add esp, 0xc
lea ebx, [ebp - 0x3d4]
cmp word [ebp - 0x8c], 0x40
jne 0x404408
lea ebx, [ebp - 0x5d4]
movsx eax, word [ebp - 0x76]
add eax, eax
add eax, 3
test eax, eax
jns 0x404418
add eax, 3
sar eax, 2
shl eax, 2
mov dword [ebp - 0x80], eax
push 0
push 0x10
movsx edx, word [ebp - 0x78]
push edx
movsx ecx, word [ebp - 0x76]
push ecx
call fcn.0040340c
add esp, 0x10
mov dword [ebp - 0x88], eax
movsx eax, word [ebp - 0x78]
imul dword [ebp - 0x80]
add eax, dword [ebp - 0x88]
push eax
call fcn.0049f2bc
pop ecx
mov dword [ebp - 0x7c], eax
mov edx, dword [ebp - 0x7c]
push edx
push 0x10
movsx ecx, word [ebp - 0x78]
push ecx
movsx eax, word [ebp - 0x76]
push eax
call fcn.0040340c
mov ecx, dword [ebp - 0x7c]
add esp, 0x10
add ecx, dword [ebp - 0x88]
xor eax, eax
mov dword [ebp - 0x5c], ecx
lea edx, [esi + 8]
jmp 0x4044b6
xor ecx, ecx
mov dword [ebp - 0x64], ecx
jmp 0x4044a0
mov ecx, dword [ebp - 0x64]
movzx ecx, byte [edx + ecx]
push dword [ebx + ecx*2]
mov ecx, dword [ebp - 0x5c]
mov edi, dword [ebp - 0x64]
lea edi, [ecx + edi*2]
pop ecx
mov word [edi], cx
inc dword [ebp - 0x64]
movsx ecx, word [ebp - 0x76]
cmp ecx, dword [ebp - 0x64]
jg 0x404486
movsx ecx, word [ebp - 0x76]
add edx, ecx
mov ecx, dword [ebp - 0x80]
add dword [ebp - 0x5c], ecx
inc eax
movsx ecx, word [ebp - 0x78]
cmp eax, ecx
jl 0x40447f
push esi
call fcn.0049f0e4
pop ecx
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x5c], eax
movsx edx, word [ebp - 0x78]
imul edx, dword [ebp - 0x80]
add edx, dword [ebp - 0x88]
sar edx, 1
jns 0x4044e0
adc edx, 0
mov dword [ebp - 0x60], edx
mov eax, dword [ebp - 0xa0]
mov ecx, dword [ebp - 0x60]
add ecx, ecx
mov edx, dword [ebp - 0x5c]
mov ebx, dword [eax]
call dword [ebx + 8]
xor edx, edx
mov eax, dword [ebp - 0xa0]
call fcn.0048c040
mov edx, dword [ebp - 0xa0]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x50]
mov ebx, dword [ebp - 0x9c]
mov dword [ebp - 0x2c], ebx
test ebx, ebx
je 0x40453c
mov eax, dword [ebx]
mov dword [ebp - 0x28], eax
mov word [ebp - 0x48], 0x80
mov edx, 3
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x48], 0x74
mov ebx, dword [ebp - 0xa0]
mov dword [ebp - 0x34], ebx
test ebx, ebx
je 0x404567
mov eax, dword [ebx]
mov dword [ebp - 0x30], eax
mov word [ebp - 0x48], 0x98
mov edx, 3
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x48], 0x8c
mov edx, dword [ebp - 0x5c]
push edx
call fcn.0049f0f4
pop ecx
mov al, 1
mov edx, dword [ebp - 0x58]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret