Function at 0x40a0f0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x50
mov eax, dword [0x42b1bc]
xor ecx, ecx
test eax, eax
mov dword [esp + 8], eax
mov dword [esp + 0x30], ecx
je 0x40ae7e
push ebx
push ebp
push esi
push edi
mov edi, edi
mov ecx, dword [esp + 0x64]
cmp ecx, dword [eax + 0x10]
jne 0x40a12c
mov edx, dword [esp + 0x68]
cmp edx, dword [eax + 0x14]
jne 0x40a12c
test byte [eax + 6], 0x10
je 0x40ae50
xor esi, esi
mov si, word [eax + 6]
or esi, 1
mov ecx, esi
and esi, 0xfffb
mov word [eax + 6], si
movzx eax, byte [eax + 4]
and ecx, 1
sub eax, 2
mov dword [esp + 0x5c], ecx
jne 0x40ae2a
mov eax, dword [0x42b240]
test eax, eax
je 0x40ae2a
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x64]
mov eax, dword [esp + 0x68]
mov dword [ecx + 0x10], edi
mov dword [ecx + 0x14], eax
mov ebp, dword [0x42a2fc]
mov ebx, dword [0x42a2f8]
mov edx, edi
sub edx, ebp
sub edx, ebx
mov dword [esp + 0x20], edx
mov edx, esi
or edx, 3
xor ebx, ebx
mov word [ecx + 6], dx
cmp dword [0x42b240], ebx
mov dword [esp + 0x3c], ebx
je 0x40acf2
cmp dword [0x42b248], ebx
je 0x40acf2
cmp dword [0x42a2c8], ebx
je 0x40acf2
sub eax, dword [0x42a300]
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x24], eax
mov dword [ecx + 0x1980], ebx
mov eax, dword [0x42b248]
mov ecx, dword [eax + 0x10]
mov edx, dword [0x42b240]
mov esi, dword [0x42a2fc]
mov dword [esp + 0x38], ecx
mov ecx, dword [edx]
mov edx, dword [0x42a2f8]
mov eax, edi
sub eax, esi
sub eax, edx
cmp ecx, ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], eax
je 0x40a75a
mov eax, dword [0x42b248]
mov edi, dword [eax + 0xc]
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x34]
mov ecx, dword [0x42b240]
mov ebp, dword [ecx + eax*4 + 0xc]
neg edi
dec edx
inc eax
mov dword [esp + 0x44], eax
mov eax, ebp
mov dword [esp + 0x34], edx
mov dword [esp + 0x4c], ebp
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40a240
sub eax, ecx
dec eax
lea edx, [eax*4 + 4]
push edx
mov dword [esp + 0x4c], eax
xor esi, esi
xor ebx, ebx
call dword [sym.imp.MSVCR71.dll_malloc]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x4c]
add esp, 4
test eax, eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x10], 1
jl 0x40a45e
jmp 0x40a290
movzx eax, byte [esi + ebp]
cmp eax, 0x80
jl 0x40a310
mov ecx, dword [0x42b1c8]
test ecx, ecx
je 0x40a2fb
mov ecx, eax
and ecx, 0xe0
cmp cl, 0xc0
jne 0x40a2c9
inc esi
xor edx, edx
mov dl, byte [esi + ebp]
and eax, 0x1f
shl eax, 6
and edx, 0x3f
or eax, edx
jmp 0x40a310
mov ecx, eax
and ecx, 0xf0
cmp cl, 0xe0
jne 0x40a310
xor edx, edx
mov dl, byte [esi + ebp + 1]
inc esi
and eax, 0xf
shl eax, 6
xor ecx, ecx
mov cl, byte [esi + ebp + 1]
and edx, 0x3f
or edx, eax
shl edx, 6
inc esi
mov eax, edx
and ecx, 0x3f
or eax, ecx
jmp 0x40a310
mov ecx, dword [0x42b1b4]
test ecx, ecx
je 0x40a310
movzx edx, byte [esi + ebp + 1]
inc esi
shl eax, 8
add eax, edx
test eax, eax
jne 0x40a3a0
mov eax, 1
mov edx, dword [0x42b248]
movsx ecx, word [edx + eax*2 + 0x60094]
add ecx, dword [edx + 0xc]
mov edx, dword [esp + 0x64]
sub edx, dword [0x42a2fc]
add ecx, edi
sub edx, dword [0x42a2f8]
cmp ecx, edx
jg 0x40a428
mov edx, dword [esp + 0x10]
test edx, edx
jne 0x40a358
mov dword [esp + 0x10], 1
mov edx, dword [esp + 0x2c]
mov dword [edx + ebx*4], eax
mov edi, ecx
mov ecx, dword [0x42a2d0]
inc ebx
test ecx, ecx
jne 0x40a451
mov ecx, dword [0x42b248]
movsx eax, word [ecx + eax*2 + 0x94]
test eax, eax
jl 0x40a451
mov eax, dword [ecx + eax*4 + 0x14]
mov eax, dword [eax + 0xc]
cmp eax, dword [esp + 0x38]
jle 0x40a451
mov dword [esp + 0x38], eax
jmp 0x40a451
cmp eax, 0x20
jne 0x40a31d
push 0x18
push 1
call dword [sym.imp.MSVCR71.dll_calloc]
mov ebp, eax
mov eax, dword [esp + 0x24]
add esp, 8
test eax, eax
jne 0x40a3c6
mov dword [esp + 0x1c], ebp
jmp 0x40a3e2
mov eax, dword [esp + 0x24]
mov dword [ebp + 0x10], eax
mov dword [eax + 0x14], ebp
mov eax, dword [0x42b248]
movsx ecx, word [eax + 0x600d4]
add ecx, dword [eax + 0xc]
mov dword [ebp], ecx
lea edx, [ebx*4]
push edx
mov dword [esp + 0x28], ebp
mov dword [ebp + 4], edi
mov dword [ebp + 8], ebx
call dword [sym.imp.MSVCR71.dll_malloc]
mov dword [ebp + 0xc], eax
add esp, 4
xor eax, eax
test ebx, ebx
jle 0x40a41e
mov ecx, dword [esp + 0x2c]
lea ebx, [ebx]
mov edi, dword [ecx + eax*4]
mov edx, dword [ebp + 0xc]
mov dword [edx + eax*4], edi
inc eax
cmp eax, ebx
jl 0x40a410
mov ebp, dword [esp + 0x4c]
xor ebx, ebx
xor edi, edi
jmp 0x40a451
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40a451
mov ecx, dword [sym.imp.MSVCR71.dll__iob]
push ebp
add ecx, 0x40
push str.WARN:_Subtitle_word__s_too_long__n
push ecx
call dword [sym.imp.MSVCR71.dll_fprintf]
add esp, 0xc
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x48]
inc esi
cmp esi, eax
jle 0x40a290
push 0x18
push 1
call dword [sym.imp.MSVCR71.dll_calloc]
mov ebp, dword [esp + 0x24]
add esp, 8
test ebp, ebp
mov esi, eax
jne 0x40a47d
mov ebp, esi
mov dword [esp + 0x1c], ebp
jmp 0x40a498
mov eax, dword [esp + 0x24]
mov dword [esi + 0x10], eax
mov dword [eax + 0x14], esi
mov eax, dword [0x42b248]
movsx edx, word [eax + 0x600d4]
add edx, dword [eax + 0xc]
mov dword [esi], edx
lea eax, [ebx*4]
push eax
mov dword [esi + 4], edi
mov dword [esi + 8], ebx
call dword [sym.imp.MSVCR71.dll_malloc]
mov dword [esi + 0xc], eax
add esp, 4
xor eax, eax
test ebx, ebx
jle 0x40a4ce
mov ecx, dword [esp + 0x2c]
lea esp, [esp]
mov edi, dword [ecx + eax*4]
mov edx, dword [esi + 0xc]
mov dword [edx + eax*4], edi
inc eax
cmp eax, ebx
jl 0x40a4c0
test ebp, ebp
je 0x40a74e
mov ebx, dword [sym.imp.MSVCR71.dll_calloc]
push 0x10
xor esi, esi
push 1
mov dword [esp + 0x2c], esi
call ebx
mov edi, dword [esp + 0x24]
mov ebp, eax
lea eax, [ebp + 4]
add esp, 8
mov dword [esp + 0x10], ebp
mov dword [esp + 0x58], eax
mov dword [eax], edi
test edi, edi
mov ecx, dword [esp + 0x30]
je 0x40a520
mov eax, dword [edi + 4]
mov edx, dword [edi]
add eax, esi
add eax, edx
cmp eax, ecx
jg 0x40a6b0
mov edi, dword [edi + 0x14]
test edi, edi
mov esi, eax
jne 0x40a506
mov eax, dword [esp + 0x10]
mov dword [ebp], esi
mov edi, dword [eax + 0xc]
test edi, edi
lea ebp, [eax + 0xc]
mov dword [esp + 0x1c], ebp
je 0x40a562
mov ecx, edi
test ecx, ecx
je 0x40a559
mov esi, dword [eax]
mov ebx, dword [esp + 0x24]
mov edx, dword [ecx]
mov ecx, dword [ecx + 0xc]
mov eax, esi
sub eax, edx
cdq
xor eax, edx
sub eax, edx
add ebx, eax
test ecx, ecx
jne 0x40a541
mov dword [esp + 0x24], ebx
mov eax, edi
mov edi, dword [eax + 0xc]
test edi, edi
jne 0x40a535
cmp dword [ebp], 0
je 0x40a6e3
lea esp, [esp]
mov eax, dword [esp + 0x1c]
cmp dword [eax], 0
mov ebp, dword [esp + 0x10]
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 1
je 0x40a6e3
mov ebx, eax
mov dword [esp + 0x2c], ebx
mov ecx, dword [ebx]
mov eax, dword [ebp + 4]
mov edx, dword [eax + 0x14]
mov edi, dword [ecx + 4]
cmp edx, edi
je 0x40a5b1
mov esi, edi
mov eax, edx
mov edx, dword [eax + 0x14]
cmp edx, esi
jne 0x40a5a8
mov edx, dword [edi]
mov esi, dword [ecx]
mov edi, dword [eax + 4]
add edx, esi
add edx, edi
cmp edx, dword [esp + 0x30]
mov dword [esp + 0x54], esi
jg 0x40a650
mov edi, dword [eax]
mov edx, dword [ebp]
mov ebx, dword [eax + 4]
mov dword [esp + 0x50], edx
sub edx, edi
sub edx, ebx
mov dword [ebp], edx
mov edx, dword [ecx + 4]
mov edx, dword [edx]
add edx, esi
mov esi, dword [eax + 4]
mov eax, dword [esp + 0x1c]
add edx, esi
mov dword [ecx], edx
mov eax, dword [eax]
mov edx, dword [esp + 0x10]
xor edi, edi
test eax, eax
je 0x40a625
mov ebx, eax
lea ecx, [ecx]
mov ecx, ebx
test ecx, ecx
je 0x40a61c
mov esi, dword [edx]
mov edx, dword [ecx]
mov ecx, dword [ecx + 0xc]
mov eax, esi
sub eax, edx
cdq
xor eax, edx
sub eax, edx
add edi, eax
test ecx, ecx
jne 0x40a608
mov edx, ebx
mov ebx, dword [edx + 0xc]
test ebx, ebx
jne 0x40a600
cmp edi, dword [esp + 0x24]
jge 0x40a63b
mov dword [esp + 0x24], edi
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x48], 0
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x2c]
mov eax, dword [edx]
mov dword [ebp], ecx
mov ecx, dword [esp + 0x54]
mov dword [eax], ecx
mov ebx, edx
mov ebp, dword [ebx]
mov eax, dword [ebp + 0xc]
test eax, eax
lea ebx, [ebp + 0xc]
mov dword [esp + 0x2c], ebx
jne 0x40a597
mov eax, dword [esp + 0x48]
test eax, eax
jne 0x40a6e3
mov esi, dword [esp + 0x4c]
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x14]
mov edi, dword [edx + 4]
cmp ecx, edi
je 0x40a68d
mov eax, ecx
mov ecx, dword [eax + 0x14]
cmp ecx, edi
jne 0x40a684
mov ebx, dword [esi]
mov edi, dword [eax]
mov ebp, dword [eax + 4]
mov ecx, dword [edx]
add edi, ebp
sub ebx, edi
mov dword [esi], ebx
mov esi, dword [edx + 4]
mov esi, dword [esi]
add esi, ecx
add esi, dword [eax + 4]
mov dword [edx], esi
mov dword [edx + 4], eax
jmp 0x40a570
push 0x10
push 1
call ebx
mov dword [ebp], esi
mov dword [ebp + 0xc], eax
mov dword [eax + 8], ebp
mov dword [eax + 4], edi
mov ebp, eax
mov eax, dword [0x42b248]
mov edx, dword [eax + 0xc]
movsx ecx, word [eax + 0x600d4]
neg edx
shl edx, 1
mov esi, edx
add esp, 8
sub esi, ecx
jmp 0x40a4fe
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x40a70e
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x14], eax
mov dword [esp + 0x28], eax
mov eax, dword [edx]
test eax, eax
je 0x40a74e
mov dword [esp + 0x28], eax
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x40a701
jmp 0x40a74e
mov eax, dword [eax + 4]
mov ecx, dword [eax + 0x14]
test ecx, ecx
je 0x40a722
mov eax, dword [eax + 0x14]
mov ecx, dword [eax + 0x14]
test ecx, ecx
jne 0x40a718
mov ecx, dword [esp + 0x58]
mov edx, dword [ecx]
mov dword [eax + 0x14], edx
mov ecx, dword [ecx]
mov dword [ecx + 0x10], eax
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x28]
mov dword [eax + 0xc], ecx
mov dword [ecx + 8], eax
mov edi, edi
mov eax, dword [eax + 0xc]
mov ecx, dword [eax + 0xc]
test ecx, ecx
mov dword [esp + 0x28], eax
jne 0x40a740
mov eax, dword [esp + 0x34]
test eax, eax
jne 0x40a211
mov ecx, dword [0x42a300]
mov edx, dword [esp + 0x68]
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
xor esi, esi
sub edx, ecx
cmp edi, esi
mov dword [ebx + 0xc], edx
mov dword [ebx + 0x1980], esi
mov dword [esp + 0x28], edi
je 0x40a90d
lea eax, [ebx + 0x1940]
mov dword [esp + 0x4c], eax
nop
mov eax, dword [ebx + 0x1980]
cmp eax, 0x10
lea ecx, [eax + 1]
mov dword [ebx + 0x1980], ecx
jge 0x40a8b8
mov eax, dword [esp + 0x38]
mov edx, dword [0x42a304]
add edx, eax
cmp edx, dword [ebx + 0xc]
jg 0x40a8d1
mov edi, dword [esp + 0x64]
mov ebp, dword [0x42a2fc]
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx]
mov eax, edi
sub eax, ebp
mov ebp, dword [0x42a2f8]
sub eax, ebp
sub eax, ecx
cdq
sub eax, edx
mov edx, eax
mov eax, dword [esp + 0x4c]
add eax, 4
sar edx, 1
add edx, ebp
mov dword [eax - 4], edx
mov ebp, dword [0x42a2f8]
mov dword [esp + 0x4c], eax
mov eax, edi
mov edi, dword [0x42a2fc]
sub eax, edi
sub eax, ebp
sub eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x20]
sar eax, 1
add eax, ebp
cmp edx, eax
jle 0x40a819
mov dword [esp + 0x20], eax
mov eax, ecx
mov ecx, dword [esp + 0x64]
sub eax, edi
sub eax, ebp
add eax, ecx
mov ecx, dword [esp + 0x3c]
cdq
sub eax, edx
sar eax, 1
add eax, ebp
cmp ecx, eax
jge 0x40a838
mov dword [esp + 0x3c], eax
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx + 0xc]
test eax, eax
jne 0x40a847
xor edi, edi
jmp 0x40a84a
mov edi, dword [eax + 4]
mov eax, dword [ecx + 4]
cmp eax, edi
je 0x40a891
mov edx, dword [eax + 8]
xor ecx, ecx
test edx, edx
jle 0x40a87d
lea edx, [ebx + esi*4 + 0x3c]
mov edi, edi
cmp esi, 0x640
jg 0x40a87d
mov ebp, dword [eax + 0xc]
mov ebp, dword [ebp + ecx*4]
mov dword [edx], ebp
mov ebp, dword [eax + 8]
inc esi
add edx, 4
inc ecx
cmp ecx, ebp
jl 0x40a860
mov dword [ebx + esi*4 + 0x3c], 0x20
mov eax, dword [eax + 0x14]
inc esi
cmp eax, edi
jne 0x40a851
mov ecx, dword [esp + 0x28]
mov dword [ebx + esi*4 + 0x38], 0
mov eax, dword [0x42b248]
mov edx, dword [eax + 0x10]
sub dword [ebx + 0xc], edx
mov eax, dword [ecx + 0xc]
test eax, eax
mov dword [esp + 0x28], eax
jne 0x40a790
jmp 0x40a909
mov eax, dword [sym.imp.MSVCR71.dll__iob]
add eax, 0x40
push str.WARN:_max_ucs_lines_n
push eax
call dword [sym.imp.MSVCR71.dll_fprintf]
add esp, 8
jmp 0x40a909
mov ecx, dword [0x42b248]
mov edx, dword [ecx + 0x10]
mov ebp, dword [ebx + 0xc]
add ebp, edx
mov eax, ebp
push eax
mov dword [ebx + 0xc], ebp
mov eax, dword [sym.imp.MSVCR71.dll__iob]
add eax, 0x40
push str.WARN:_Out_of_screen_at_Y:__d_n
push eax
call dword [sym.imp.MSVCR71.dll_fprintf]
mov eax, dword [ebx + 0x1980]
add esp, 0xc
dec eax
mov dword [ebx + 0x1980], eax
mov edi, dword [esp + 0x14]
mov eax, dword [ebx + 0x1980]
cmp dword [0x42b220], eax
jge 0x40a920
mov dword [0x42b220], eax
mov ecx, dword [0x42b248]
mov eax, dword [ecx + 0x10]
cmp dword [0x42b22c], eax
jge 0x40a936
mov dword [0x42b22c], eax
movsx edx, word [ecx + 0xe4]
mov eax, dword [ecx + edx*4 + 0x14]
mov eax, dword [eax + 0xc]
cmp dword [0x42b230], eax
jge 0x40a951
mov dword [0x42b230], eax
mov eax, dword [ebx + 0x1980]
test eax, eax
je 0x40a971
mov ecx, dword [ecx + 0x10]
mov edx, dword [esp + 0x68]
imul ecx, eax
mov eax, dword [0x42a300]
sub edx, ecx
sub edx, eax
mov dword [ebx + 0xc], edx
test edi, edi
je 0x40a9da
mov esi, dword [edi + 4]
mov eax, dword [esi + 0x14]
test eax, eax
mov ebp, dword [sym.imp.MSVCR71.dll_free]
je 0x40a9a9
lea esp, [esp]
mov eax, dword [esi + 0xc]
push eax
call ebp
mov esi, dword [esi + 0x14]
mov ecx, dword [esi + 0x10]
push ecx
call ebp
mov eax, dword [esi + 0x14]
add esp, 8
test eax, eax
jne 0x40a990
mov edx, dword [esi + 0xc]
push edx
call ebp
push esi
call ebp
mov eax, dword [edi + 0xc]
add esp, 8
test eax, eax
mov esi, edi
je 0x40a9d2
mov edi, edi
mov esi, eax
mov eax, dword [esi + 8]
push eax
call ebp
mov eax, dword [esi + 0xc]
add esp, 4
test eax, eax
jne 0x40a9c0
push esi
call ebp
add esp, 4
jmp 0x40a9f2
mov ecx, dword [sym.imp.MSVCR71.dll__iob]
add ecx, 0x40
push str.WARN:_Subtitles_requested_but_not_found._n
push ecx
call dword [sym.imp.MSVCR71.dll_fprintf]
add esp, 8
mov eax, dword [0x42b248]
mov esi, dword [eax + 0x10]
mov ecx, dword [ebx + 0x1980]
movsx edx, word [eax + 0xe4]
mov eax, dword [eax + edx*4 + 0x14]
mov edi, dword [eax + 0xc]
mov eax, dword [0x42a2f4]
dec ecx
imul ecx, esi
add ecx, edi
cmp eax, 2
jne 0x40aa49
mov edx, dword [0x42a2c4]
imul edx, dword [esp + 0x68]
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [0x42a300]
sub eax, ecx
sub eax, edx
mov dword [ebx + 0xc], eax
jmp 0x40aa91
cmp eax, 1
jne 0x40aa88
mov edx, dword [0x42a2c4]
imul edx, dword [esp + 0x68]
mov ebp, dword [0x42a300]
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [0x42a304]
sub eax, ecx
sub eax, edx
sub eax, ebp
add eax, esi
cdq
sub eax, edx
sar eax, 1
mov dword [ebx + 0xc], eax
jmp 0x40aa91
mov edx, dword [0x42a304]
mov dword [ebx + 0xc], edx
mov eax, dword [0x42a304]
cmp dword [ebx + 0xc], eax
jge 0x40aa9e
mov dword [ebx + 0xc], eax
mov edx, dword [0x42b248]
mov edi, dword [edx + 0x10]
mov eax, dword [esp + 0x68]
mov esi, dword [0x42a300]
mov edx, dword [ebx + 0xc]
sub eax, edi
sub eax, esi
cmp edx, eax
jle 0x40aabf
mov dword [ebx + 0xc], eax
mov eax, dword [ebx + 0xc]
lea ecx, [eax + ecx + 3]
mov dword [ebx + 0x24], ecx
mov eax, dword [0x42a2e4]
xor edi, edi
cmp eax, edi
je 0x40aade
mov edx, dword [0x42a2f8]
mov dword [esp + 0x20], edx
mov eax, dword [esp + 0x20]
add eax, 0xfffffffd
mov dword [ebx + 0x18], eax
mov ecx, dword [0x42b248]
mov edx, dword [ecx + 8]
mov eax, dword [esp + 0x3c]
or byte [ebx + 6], 4
lea ecx, [edx + eax + 3]
mov edx, dword [ebx + 0xc]
sub edx, 3
mov esi, ebx
mov dword [ebx + 0x20], ecx
mov dword [ebx + 0x1c], edx
call fcn.00409fd0
mov eax, dword [0x42b240]
movzx eax, byte [eax + 0x4c]
sub eax, edi
mov ebp, dword [ebx + 0xc]
mov dword [esp + 0x3c], ebp
je 0x40ab33
dec eax
mov al, byte [ebx + 5]
je 0x40ab2e
or al, 2
jmp 0x40ab30
or al, 1
mov byte [ebx + 5], al
mov ecx, dword [ebx + 0x1980]
cmp ecx, edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x1c], edi
je 0x40ad00
mov edx, dword [esp + 0x64]
mov eax, dword [0x42a2fc]
mov esi, dword [0x42a2f8]
sub edx, eax
sub edx, esi
cmp ecx, edi
mov dword [esp + 0x48], edx
jle 0x40ab82
lea esi, [ebx + 0x1940]
mov edi, ecx
lea esp, [esp]
mov eax, dword [esi]
cmp eax, edx
jge 0x40ab78
mov edx, eax
add esi, 4
dec edi
jne 0x40ab70
mov dword [esp + 0x48], edx
test ecx, ecx
jle 0x40ad00
lea eax, [ebx + 0x1940]
mov dword [esp + 0x28], eax
mov eax, dword [0x42b248]
mov dword [esp + 0x38], ecx
lea ecx, [ecx]
xor ecx, ecx
mov cl, byte [ebx + 5]
and ecx, 3
dec ecx
je 0x40abc3
dec ecx
mov ecx, dword [esp + 0x28]
mov esi, dword [ecx]
jne 0x40abd3
xor ecx, ecx
cmp esi, edx
setne cl
add esi, esi
sub esi, ecx
sub esi, edx
jmp 0x40abd3
mov ecx, dword [0x42a2e4]
test ecx, ecx
mov esi, dword [esp + 0x20]
jne 0x40abd3
mov esi, edx
mov ecx, dword [esp + 0x1c]
mov edi, dword [ebx + ecx*4 + 0x3c]
test edi, edi
lea ecx, [ebx + ecx*4 + 0x3c]
mov dword [esp + 0x10], esi
je 0x40acaa
mov edx, ecx
lea ecx, [ecx]
inc dword [esp + 0x1c]
movsx ecx, word [eax + edi*2 + 0x94]
add edx, 4
test ecx, ecx
mov dword [esp + 0x50], edx
jl 0x40ac8b
mov edx, dword [eax + ecx*4 + 0x14]
mov edx, dword [edx + 0xc]
mov esi, dword [ebx + 0x14]
add ebp, edx
mov dword [esp + 0x58], edx
mov edx, dword [0x42a300]
mov dword [esp + 0x54], esi
sub esi, edx
cmp ebp, esi
jge 0x40ac35
mov edx, dword [esp + 0x58]
mov dword [esp + 0x4c], edx
jmp 0x40ac43
mov esi, dword [esp + 0x54]
sub esi, dword [esp + 0x3c]
sub esi, edx
mov dword [esp + 0x4c], esi
mov edx, dword [eax + ecx*4 + 0x14]
mov ecx, dword [eax + ecx*4 + 0x54]
mov esi, dword [eax + edi*4 + 0x20094]
mov ebp, dword [edx]
mov ecx, dword [ecx]
movsx eax, word [eax + edi*2 + 0x60094]
add ebp, esi
push ebp
mov ebp, dword [esp + 0x40]
add ecx, esi
mov esi, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x54]
push ecx
push eax
mov eax, dword [edx + 8]
push ebp
mov edx, esi
mov ecx, ebx
call fcn.00409e80
mov eax, dword [0x42b248]
mov edx, dword [esp + 0x64]
add esp, 0x14
movsx ecx, word [eax + edi*2 + 0x60094]
add ecx, dword [eax + 0xc]
mov edi, dword [edx]
add esi, ecx
test edi, edi
mov dword [esp + 0x10], esi
jne 0x40abf0
mov edx, dword [esp + 0x48]
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x44]
inc esi
mov ecx, esi
sub ecx, edi
cmp dword [0x42b234], ecx
mov dword [esp + 0x1c], esi
jge 0x40acc9
mov dword [0x42b234], ecx
mov edi, dword [eax + 0x10]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x44], esi
mov esi, dword [esp + 0x28]
add ebp, edi
add esi, 4
dec ecx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x28], esi
mov dword [esp + 0x38], ecx
jne 0x40aba0
jmp 0x40ad00
mov ebx, dword [esp + 0x18]
and edx, 0xfffe
mov word [ecx + 6], dx
mov ecx, dword [0x42a310]
mov esi, dword [ebx + 0x18]
lea edx, [ecx + ecx*2]
mov dword [esp + 0x54], edx
mov edx, dword [ebx + 0x1c]
mov eax, edx
imul eax, ecx
mov ecx, dword [0x42b23c]
add eax, esi
lea ebp, [ecx + eax*2]
mov ecx, dword [ebx + 0x198c]
add ebp, eax
mov eax, dword [ebx + 0x1984]
mov dword [esp + 0x58], eax
mov eax, dword [ebx + 0x1990]
mov dword [esp + 0x3c], eax
mov eax, dword [ebx + 0x24]
mov ebx, dword [ebx + 0x20]
sub eax, edx
sub ebx, esi
test eax, eax
mov dword [esp + 0x38], ecx
jle 0x40ae2a
mov dword [esp + 0x48], eax
lea esp, [esp]
test ebx, ebx
mov eax, ebp
jle 0x40adfd
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x3c]
sub edi, esi
mov dword [esp + 0x4c], ebx
jmp 0x40ad80
cmp byte [esi], 0
je 0x40adee
movzx edx, byte [esi]
movzx ecx, byte [eax]
imul ecx, edx
mov dl, byte [edi + esi]
sar ecx, 8
add cl, dl
mov byte [eax], cl
movzx edx, byte [esi]
movzx ecx, byte [eax + 1]
imul ecx, edx
mov dl, byte [edi + esi]
sar ecx, 8
add cl, dl
movzx edx, byte [eax + 2]
mov byte [eax + 1], cl
movzx ecx, byte [esi]
imul ecx, edx
mov dl, byte [edi + esi]
sar ecx, 8
add cl, dl
mov byte [eax + 2], cl
xor ecx, ecx
mov dl, byte [ecx + eax]
test dl, dl
je 0x40ade8
cmp dl, 0xaa
jb 0x40adda
mov byte [ecx + eax], 0xff
jmp 0x40ade8
cmp dl, 0x7f
sbb dl, dl
and dl, 0x82
add dl, 0x7f
mov byte [ecx + eax], dl
inc ecx
cmp ecx, 3
jl 0x40adc8
mov ecx, dword [esp + 0x4c]
add eax, 3
inc esi
dec ecx
mov dword [esp + 0x4c], ecx
jne 0x40ad80
mov eax, dword [esp + 0x58]
mov esi, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x54]
add esi, eax
add edx, eax
mov eax, dword [esp + 0x48]
add ebp, ecx
dec eax
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], edx
mov dword [esp + 0x48], eax
jne 0x40ad60
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x5c]
xor ecx, ecx
mov cx, word [eax + 6]
mov edx, ecx
and edx, 1
cmp esi, edx
je 0x40ae48
or ecx, 2
mov word [eax + 6], cx
and byte [eax + 6], 0xef
mov eax, dword [esp + 0x18]
test byte [eax + 6], 2
je 0x40ae64
mov cl, byte [eax + 4]
mov edx, 1
shl edx, cl
or dword [esp + 0x40], edx
mov eax, dword [eax]
test eax, eax
mov dword [esp + 0x18], eax
jne 0x40a110
mov eax, dword [esp + 0x40]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret
mov eax, ecx
add esp, 0x50
ret