Function at 0x56ff30
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x468
mov eax, dword [0x5e0ce8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x42c], eax
mov dword [ebp - 0x420], edi
test edi, edi
je 0x5709fa
push edi
call fcn.0056fc80
mov ebx, eax
add esp, 4
mov dword [ebp - 0x440], ebx
test ebx, ebx
jne 0x570046
mov edx, dword [0x5e0cd0]
mov dword [ebp - 0x41c], eax
test edx, edx
je 0x5709fa
lea ecx, [ecx]
mov ecx, edi
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x56ff95
sub ecx, esi
mov esi, edx
lea ebx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x56ffa3
sub esi, ebx
lea eax, [esi + ecx]
cmp eax, 0x400
jae 0x570017
lea esi, [ebp - 0x404]
mov ecx, edi
sub esi, edi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x56ffc0
mov esi, edx
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x56ffd0
lea edi, [ebp - 0x404]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x56ffe0
mov ecx, edx
lea eax, [ebp - 0x404]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.0056fc80
mov ebx, eax
mov dword [ebp - 0x440], eax
add esp, 4
test ebx, ebx
jne 0x570046
mov edi, dword [ebp - 0x420]
mov eax, dword [ebp - 0x41c]
inc eax
mov dword [ebp - 0x41c], eax
mov edx, dword [eax*4 + 0x5e0cd0]
test edx, edx
jne 0x56ff90
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057516e
mov esp, ebp
pop ebp
ret
push 0xef
push 1
lea eax, [ebp - 0x404]
push eax
push ebx
call sym.MonteX34_DC.exe_SDL_RWread
add esp, 0x10
cmp eax, 0xef
jne 0x5709f1
lea ecx, [ebp - 0x404]
mov edx, str.GF1PATCH110
mov esi, 0x12
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x570091
add ecx, 4
add edx, 4
sub esi, 4
jae 0x570078
mov ax, word [ecx]
cmp ax, word [edx]
je 0x5700c2
lea ecx, [ebp - 0x404]
mov edx, str.GF1PATCH100
mov esi, 0x12
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x5709f1
add ecx, 4
add edx, 4
sub esi, 4
jae 0x5700a1
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x5709f1
mov al, byte [ebp - 0x3b2]
cmp al, 1
je 0x5700d4
test al, al
jne 0x5709f1
mov al, byte [ebp - 0x36d]
cmp al, 1
je 0x5700e6
test al, al
jne 0x5709f1
push 8
call fcn.0056fda0
movsx ecx, byte [ebp - 0x33e]
mov esi, eax
mov dword [ebp - 0x420], esi
mov dword [esi], ecx
imul ecx, ecx, 0x6c
push ecx
call fcn.0056fda0
xor edi, edi
mov dword [esi + 4], eax
add esp, 8
mov dword [ebp - 0x430], edi
cmp dword [esi], edi
jle 0x570975
fld qword [0x5a8640]
mov eax, dword [ebp + 0x1c]
fstp qword [ebp - 0x450]
fld qword [0x5a7220]
fstp qword [ebp - 0x458]
fld qword [0x5ba038]
fstp qword [ebp - 0x460]
fld qword [0x5a8648]
mov dword [ebp - 0x448], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x444], eax
mov eax, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
fstp qword [ebp - 0x468]
mov dword [ebp - 0x43c], edi
mov dword [ebp - 0x41c], eax
push 1
push 0
push 7
push ebx
call sym.MonteX34_DC.exe_SDL_RWseek
push 1
push 1
lea eax, [ebp - 0x40a]
push eax
push ebx
call sym.MonteX34_DC.exe_SDL_RWread
add esp, 0x20
cmp eax, 1
jne 0x570997
mov eax, dword [esi + 4]
mov esi, dword [ebp - 0x43c]
push 1
add esi, eax
lea eax, [ebp - 0x410]
push 4
push eax
push ebx
mov dword [ebp - 0x438], esi
call sym.MonteX34_DC.exe_SDL_RWread
add esp, 0x10
cmp eax, 1
jne 0x570997
mov eax, dword [ebp - 0x410]
push 1
mov dword [esi + 8], eax
lea eax, [ebp - 0x410]
push 4
push eax
push ebx
call sym.MonteX34_DC.exe_SDL_RWread
add esp, 0x10
cmp eax, 1
jne 0x570997
mov eax, dword [ebp - 0x410]
push 1
mov dword [esi], eax
lea eax, [ebp - 0x410]
push 4
push eax
push ebx
call sym.MonteX34_DC.exe_SDL_RWread
add esp, 0x10
cmp eax, 1
jne 0x570997
mov eax, dword [ebp - 0x410]
push 1
mov dword [esi + 4], eax
lea eax, [ebp - 0x434]
push 2
push eax
push ebx
call sym.MonteX34_DC.exe_SDL_RWread
add esp, 0x10
cmp eax, 1
jne 0x570997
movzx eax, word [ebp - 0x434]
push 1
mov dword [esi + 0xc], eax
lea eax, [ebp - 0x410]
push 4
push eax
push ebx
call sym.MonteX34_DC.exe_SDL_RWread
add esp, 0x10
cmp eax, 1
jne 0x570997
mov eax, dword [ebp - 0x410]
push 1
mov dword [esi + 0x10], eax
lea eax, [ebp - 0x410]
push 4
push eax
push ebx
call sym.MonteX34_DC.exe_SDL_RWread
add esp, 0x10
cmp eax, 1
jne 0x570997
mov eax, dword [ebp - 0x410]
push 1
mov dword [esi + 0x14], eax
lea eax, [ebp - 0x410]
push 4
push eax
push ebx
call sym.MonteX34_DC.exe_SDL_RWread
add esp, 0x10
cmp eax, 1
jne 0x570997
mov eax, dword [ebp - 0x410]
push 1
push 0
push 2
push ebx
mov dword [esi + 0x18], eax
call sym.MonteX34_DC.exe_SDL_RWseek
push 1
push 1
lea eax, [ebp - 0x409]
push eax
push ebx
call sym.MonteX34_DC.exe_SDL_RWread
add esp, 0x20
cmp eax, 1
jne 0x570997
mov al, byte [ebp - 0x409]
mov ecx, dword [ebp - 0x444]
mov byte [ebp - 0x404], al
cmp ecx, 0xffffffff
jne 0x5702fb
shl al, 3
add al, 4
jmp 0x5702fd
mov al, cl
and al, 0x7f
push 0x12
mov byte [esi + 0x67], al
lea eax, [ebp - 0x404]
push 1
push eax
push ebx
call sym.MonteX34_DC.exe_SDL_RWread
add esp, 0x10
cmp eax, 0x12
jne 0x570997
cmp byte [ebp - 0x3f7], 0
je 0x570382
cmp byte [ebp - 0x3f6], 0
je 0x570382
mov al, byte [ebp - 0x3f8]
mov edi, dword [ebp - 0x42c]
test al, al
jne 0x570345
xor eax, eax
jmp 0x570359
movzx ecx, al
imul eax, dword [edi + 0xf2c8], 0x260000
imul ecx, dword [edi + 8]
cdq
idiv ecx
mov dword [esi + 0x54], eax
movzx eax, byte [ebp - 0x3f7]
imul eax, dword [edi + 0xf2c8]
imul ecx, dword [edi + 8], 0x26
shl eax, 0xf
cdq
idiv ecx
mov dword [esi + 0x58], eax
mov al, byte [ebp - 0x3f6]
mov byte [esi + 0x64], al
jmp 0x57039a
mov edi, dword [ebp - 0x42c]
mov byte [esi + 0x64], 0
mov dword [esi + 0x58], 0
mov dword [esi + 0x54], 0
mov al, byte [ebp - 0x3f4]
test al, al
je 0x570444
cmp byte [ebp - 0x3f3], 0
je 0x570444
movzx ecx, al
imul eax, dword [edi + 8], 0x26
shl ecx, 6
cdq
idiv ecx
mov dword [esi + 0x60], eax
cmp byte [ebp - 0x3f5], 0
mov dword [ebp - 0x408], eax
jne 0x5703e4
xor eax, eax
mov dword [esi + 0x5c], eax
mov al, byte [ebp - 0x3f3]
mov byte [esi + 0x65], al
jmp 0x570456
fild dword [ebp - 0x408]
fstp qword [ebp - 0x428]
fld qword [ebp - 0x428]
fmul qword [ebp - 0x450]
movzx eax, byte [ebp - 0x3f5]
imul eax, dword [edi + 8]
fmul qword [ebp - 0x458]
fstp dword [ebp - 0x408]
fld dword [ebp - 0x408]
mov dword [ebp - 0x408], eax
fild dword [ebp - 0x408]
fstp qword [ebp - 0x428]
fdiv qword [ebp - 0x428]
call fcn.00575b40
mov dword [esi + 0x5c], eax
mov al, byte [ebp - 0x3f3]
mov byte [esi + 0x65], al
jmp 0x570456
mov byte [esi + 0x65], 0
mov dword [esi + 0x60], 0
mov dword [esi + 0x5c], 0
push 1
push 1
lea eax, [ebp - 0x409]
push eax
push ebx
call sym.MonteX34_DC.exe_SDL_RWread
add esp, 0x10
cmp eax, 1
jne 0x570991
movzx eax, byte [ebp - 0x409]
push 1
push 0
push 0x28
push ebx
mov byte [esi + 0x66], al
call sym.MonteX34_DC.exe_SDL_RWseek
mov ecx, dword [ebp - 0x448]
xor edx, edx
add esp, 0x10
movzx eax, cl
cmp ecx, 0xffffffff
cmove eax, edx
mov byte [esi + 0x68], al
mov al, byte [esi + 0x66]
test al, 4
je 0x5704ac
or al, 0x20
mov byte [esi + 0x66], al
cmp dword [ebp + 0x20], 1
mov cl, al
jne 0x5704be
test al, 0x3c
je 0x5704be
and cl, 0xc3
mov byte [esi + 0x66], cl
mov eax, dword [ebp + 0x24]
cmp eax, 1
je 0x5704f8
test eax, eax
je 0x5704fe
test cl, 0x1c
jne 0x5704d4
and cl, 0x9f
jmp 0x5704fb
lea eax, [ebp - 0x404]
cmp dword [eax], 0x3f3f3f3f
jne 0x5704ea
cmp word [eax + 4], 0x3f3f
je 0x5704f8
cmp byte [ebp - 0x3f9], 0x64
jge 0x5704f8
test cl, 0x20
jne 0x5704fe
and cl, 0xbf
mov byte [esi + 0x66], cl
movzx edx, byte [ebp - 0x404]
mov ecx, 3
mov eax, edx
and edx, 0x3f
shr eax, 6
sub ecx, eax
lea ecx, [ecx + ecx*2]
shl edx, cl
mov ecx, 3
imul eax, edx, 0xac44
cdq
idiv dword [edi + 8]
imul eax, dword [edi + 0xf2c8]
shl eax, 0xa
mov dword [esi + 0x1c], eax
movzx eax, byte [ebp - 0x3fe]
shl eax, 0x16
mov dword [esi + 0x34], eax
movzx edx, byte [ebp - 0x403]
mov eax, edx
and edx, 0x3f
shr eax, 6
sub ecx, eax
lea ecx, [ecx + ecx*2]
shl edx, cl
mov ecx, 3
imul eax, edx, 0xac44
cdq
idiv dword [edi + 8]
imul eax, dword [edi + 0xf2c8]
shl eax, 0xa
mov dword [esi + 0x20], eax
movzx eax, byte [ebp - 0x3fd]
shl eax, 0x16
mov dword [esi + 0x38], eax
movzx edx, byte [ebp - 0x402]
mov eax, edx
and edx, 0x3f
shr eax, 6
sub ecx, eax
lea ecx, [ecx + ecx*2]
shl edx, cl
mov ecx, 3
imul eax, edx, 0xac44
cdq
idiv dword [edi + 8]
imul eax, dword [edi + 0xf2c8]
shl eax, 0xa
mov dword [esi + 0x24], eax
movzx eax, byte [ebp - 0x3fc]
shl eax, 0x16
mov dword [esi + 0x3c], eax
movzx edx, byte [ebp - 0x401]
mov eax, edx
and edx, 0x3f
shr eax, 6
sub ecx, eax
lea ecx, [ecx + ecx*2]
shl edx, cl
mov ecx, 3
imul eax, edx, 0xac44
cdq
idiv dword [edi + 8]
imul eax, dword [edi + 0xf2c8]
shl eax, 0xa
mov dword [esi + 0x28], eax
movzx eax, byte [ebp - 0x3fb]
shl eax, 0x16
mov dword [esi + 0x40], eax
movzx edx, byte [ebp - 0x400]
mov eax, edx
and edx, 0x3f
shr eax, 6
sub ecx, eax
lea ecx, [ecx + ecx*2]
shl edx, cl
imul eax, edx, 0xac44
cdq
idiv dword [edi + 8]
imul eax, dword [edi + 0xf2c8]
shl eax, 0xa
mov dword [esi + 0x2c], eax
mov ecx, 3
movzx eax, byte [ebp - 0x3fa]
shl eax, 0x16
mov dword [esi + 0x44], eax
movzx edx, byte [ebp - 0x3ff]
mov eax, edx
and edx, 0x3f
shr eax, 6
sub ecx, eax
lea ecx, [ecx + ecx*2]
shl edx, cl
imul eax, edx, 0xac44
cdq
idiv dword [edi + 8]
imul eax, dword [edi + 0xf2c8]
shl eax, 0xa
mov dword [esi + 0x30], eax
movzx eax, byte [ebp - 0x3f9]
shl eax, 0x16
mov dword [esi + 0x48], eax
mov eax, dword [esi + 8]
add eax, 4
push eax
call fcn.0056fda0
push 1
push dword [esi + 8]
mov dword [esi + 0x50], eax
push eax
push ebx
call sym.MonteX34_DC.exe_SDL_RWread
add esp, 0x14
cmp eax, 1
jne 0x570991
mov ecx, dword [esi + 0x50]
mov dword [ebp - 0x414], ecx
test byte [esi + 0x66], al
jne 0x570728
mov eax, dword [esi]
mov ecx, dword [esi + 8]
add eax, eax
mov dword [esi], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x408], ecx
add eax, eax
add ecx, ecx
mov dword [esi + 4], eax
mov dword [esi + 8], ecx
lea eax, [ecx + 4]
push eax
call fcn.0056fda0
mov edx, dword [ebp - 0x408]
add esp, 4
mov edi, eax
mov dword [ebp - 0x418], edi
test edx, edx
je 0x57070f
mov ecx, dword [ebp - 0x414]
mov esi, eax
movzx eax, byte [ecx]
lea esi, [esi + 2]
shl ax, 8
lea ecx, [ecx + 1]
mov word [esi - 2], ax
sub edx, 1
jne 0x5706f3
mov esi, dword [ebp - 0x438]
push dword [esi + 0x50]
call dword [ebp - 0x41c]
mov ecx, edi
mov dword [esi + 0x50], edi
add esp, 4
mov dword [ebp - 0x414], ecx
jmp 0x57072a
mov edi, ecx
test byte [esi + 0x66], 2
je 0x570766
mov eax, dword [esi + 8]
cdq
sub eax, edx
mov dword [ebp - 0x408], edi
mov edx, eax
mov dword [ebp - 0x414], ecx
sar edx, 1
je 0x570766
mov eax, edi
mov ecx, 0xffff8000
nop
xor word [eax], cx
lea eax, [eax + 2]
sub edx, 1
jne 0x570750
mov edi, dword [esi + 0x50]
mov ecx, edi
mov dword [ebp - 0x414], ecx
test byte [esi + 0x66], 0x10
mov edx, dword [esi + 8]
mov eax, edx
je 0x5707ea
cdq
sub eax, edx
sar eax, 1
lea ecx, [edi + eax*2]
cdq
sub eax, edx
mov dword [ebp - 0x408], ecx
sar eax, 1
mov dword [ebp - 0x418], eax
je 0x5707bd
mov edx, ecx
mov esi, eax
mov ax, word [edx]
lea edi, [edi + 2]
movzx ecx, word [edi - 2]
lea edx, [edx - 2]
mov word [edi - 2], ax
mov word [edx + 2], cx
sub esi, 1
jne 0x570794
mov esi, dword [ebp - 0x438]
mov edi, dword [esi + 0x50]
mov dword [ebp - 0x414], edi
mov edx, dword [esi + 8]
mov eax, edx
sub eax, dword [esi + 4]
mov ecx, dword [esi]
mov dword [esi], eax
mov eax, edx
sub eax, ecx
mov dword [ebp - 0x418], edx
mov ecx, dword [ebp - 0x414]
mov dword [esi + 4], eax
mov al, byte [esi + 0x66]
and al, 0xef
or al, 4
mov byte [esi + 0x66], al
mov eax, edx
jmp 0x5707f6
mov dword [ebp - 0x418], eax
mov dword [ebp - 0x414], ecx
cmp dword [ebp + 0x18], 0xffffffff
je 0x570816
fild dword [ebp + 0x18]
fstp qword [ebp - 0x428]
fld qword [ebp - 0x428]
fdiv qword [ebp - 0x460]
jmp 0x5708b8
mov eax, edx
mov dword [ebp - 0x408], 0
cdq
sub eax, edx
mov dword [ebp - 0x414], ecx
mov edx, dword [ebp - 0x418]
sar eax, 1
mov dword [ebp - 0x424], eax
mov dword [ebp - 0x418], edx
je 0x57088d
mov esi, eax
movzx edx, word [edi]
lea edi, [edi + 2]
mov eax, edx
dec esi
neg eax
test dx, dx
movzx ecx, ax
mov eax, edx
cmovns ecx, eax
movzx eax, cx
cmp ax, word [ebp - 0x408]
jle 0x57086b
mov dword [ebp - 0x408], eax
test esi, esi
jne 0x570843
mov esi, dword [ebp - 0x438]
mov dword [ebp - 0x440], ebx
mov eax, dword [esi + 8]
mov dword [ebp - 0x418], eax
mov eax, dword [esi + 0x50]
mov dword [ebp - 0x414], eax
mov eax, dword [ebp - 0x408]
cwde
mov dword [ebp - 0x424], eax
fild dword [ebp - 0x424]
mov eax, dword [ebp - 0x418]
fstp qword [ebp - 0x428]
fld qword [ebp - 0x428]
fdivr qword [ebp - 0x468]
cdq
sub eax, edx
mov ecx, eax
fstp dword [ebp - 0x408]
movss xmm0, dword [ebp - 0x408]
movss dword [esi + 0x4c], xmm0
mov eax, dword [esi]
cdq
sub eax, edx
sar ecx, 1
sar eax, 1
mov dword [esi], eax
mov eax, dword [esi + 4]
cdq
sub eax, edx
mov dword [esi + 8], ecx
sar eax, 1
xor edx, edx
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x414]
mov word [eax + ecx*2 + 2], dx
mov ecx, dword [esi + 8]
mov eax, dword [esi + 0x50]
mov word [eax + ecx*2], dx
shl dword [esi], 0xc
shl dword [esi + 4], 0xc
shl dword [esi + 8], 0xc
movzx eax, byte [ebp - 0x40a]
and eax, 0xf
shl eax, 8
or dword [esi], eax
movzx eax, byte [ebp - 0x40a]
and eax, 0xf0
shl eax, 4
or dword [esi + 4], eax
cmp byte [esi + 0x68], dl
je 0x570947
test byte [esi + 0x66], 4
jne 0x570947
mov eax, dword [ebp - 0x42c]
push esi
push eax
call fcn.00572ee0
add esp, 8
cmp dword [ebp + 0x28], 1
jne 0x570953
mov eax, dword [esi + 4]
mov dword [esi + 8], eax
mov edi, dword [ebp - 0x430]
mov esi, dword [ebp - 0x420]
inc edi
add dword [ebp - 0x43c], 0x6c
mov dword [ebp - 0x430], edi
cmp edi, dword [esi]
jl 0x570170
push ebx
call sym.MonteX34_DC.exe_SDL_RWclose
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057516e
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x430]
test edi, edi
jle 0x5709c1
mov ebx, dword [ebp - 0x420]
xor esi, esi
mov eax, dword [ebx + 4]
push dword [esi + eax + 0x50]
call dword [ebp - 0x41c]
add esp, 4
lea esi, [esi + 0x6c]
sub edi, 1
jne 0x5709a3
mov ebx, dword [ebp - 0x440]
mov esi, dword [ebp - 0x420]
mov edi, dword [ebp - 0x41c]
push dword [esi + 4]
call edi
push esi
call edi
push ebx
call sym.MonteX34_DC.exe_SDL_RWclose
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057516e
mov esp, ebp
pop ebp
ret
push ebx
call sym.MonteX34_DC.exe_SDL_RWclose
add esp, 4
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0057516e
mov esp, ebp
pop ebp
ret