Function at 0x58ac70
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa
Hash data using crc32b

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x470
mov eax, dword [0x675978]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
mov dword [ebp - 0x458], edi
mov dword [ebp - 0x46c], 0
mov dword [ebp - 0x470], 0
mov byte [edi + 0x4f5], 1
call fcn.0058c950
add esp, 4
test eax, eax
je 0x58b460
mov al, byte [edi + 0x4f3]
test al, 2
jne 0x58acdf
mov dword [edi + 0x70], 0x22
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a10
mov esp, ebp
pop ebp
ret
test al, 4
jne 0x58acc5
test al, 1
jne 0x58acc5
cmp dword [edi + 0x3f0], 1
jne 0x58acc5
mov al, byte [edi + 0x3f4]
cmp al, 0x1e
je 0x58ad6d
cmp al, 0x40
jne 0x58acc5
push 6
lea eax, [ebp - 0xc]
push eax
push edi
call fcn.00588bf0
add esp, 0xc
test eax, eax
je 0x58acc5
cmp byte [ebp - 0xc], 0x66
jne 0x58acc5
cmp byte [ebp - 0xb], 0x69
jne 0x58acc5
cmp byte [ebp - 0xa], 0x73
jne 0x58acc5
cmp byte [ebp - 9], 0x68
jne 0x58acc5
cmp byte [ebp - 8], 0x65
jne 0x58acc5
cmp byte [ebp - 7], 0x61
jne 0x58acc5
push edi
call fcn.005888e0
add esp, 4
cmp al, 0x64
jne 0x58acc5
push edi
call fcn.005888e0
add esp, 4
test al, al
jne 0x58acc5
mov dword [edi + 0x70], 0x26
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a10
mov esp, ebp
pop ebp
ret
push edi
call fcn.005888e0
add esp, 4
cmp al, 1
jne 0x58acc5
push 6
lea eax, [ebp - 0xc]
push eax
push edi
call fcn.00588bf0
add esp, 0xc
test eax, eax
jne 0x58adab
mov dword [edi + 0x70], 0xa
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a10
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xc]
push eax
call fcn.0058e7d0
add esp, 4
test eax, eax
je 0x58acc5
push edi
call fcn.005887a0
add esp, 4
test eax, eax
jne 0x58acc5
push edi
call fcn.005888e0
movzx eax, al
add esp, 4
mov dword [edi + 4], eax
test eax, eax
je 0x58acc5
cmp eax, 8
jbe 0x58ae06
mov dword [edi + 0x70], 5
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a10
mov esp, ebp
pop ebp
ret
push edi
call fcn.005887a0
add esp, 4
mov dword [edi], eax
test eax, eax
je 0x58acc5
push edi
call fcn.005887a0
push edi
call fcn.005887a0
push edi
call fcn.005887a0
push edi
call fcn.005888e0
movzx esi, al
add esp, 0x10
mov edx, esi
mov eax, 1
and edx, 0xf
shr esi, 4
mov ecx, edx
shl eax, cl
mov ecx, esi
mov dword [edi + 0x7c], eax
mov eax, 1
shl eax, cl
mov dword [edi + 0x80], eax
cmp edx, 6
jb 0x58b459
cmp edx, 0xd
ja 0x58b459
lea eax, [esi - 6]
cmp eax, 7
ja 0x58b459
cmp edx, esi
ja 0x58b459
push edi
call fcn.005888e0
add esp, 4
test al, 1
je 0x58acc5
push edi
call fcn.0058c950
add esp, 4
test eax, eax
je 0x58b460
push edi
call fcn.0058c830
add esp, 4
test eax, eax
je 0x58b460
push edi
call fcn.0058a170
add esp, 4
test eax, eax
je 0x58b460
push edi
call fcn.00588920
add esp, 4
mov dword [edi + 0x508], 0
cmp eax, 3
jne 0x58b459
xor esi, esi
push edi
call fcn.00588920
mov byte [ebp + esi - 0xc], al
add esp, 4
inc esi
mov dword [edi + 0x508], 0
cmp esi, 6
jl 0x58aee2
lea eax, [ebp - 0xc]
push eax
call fcn.0058e7d0
add esp, 4
test eax, eax
je 0x58b459
push edi
call fcn.00588870
mov ebx, eax
lea ecx, [ebx + 1]
push ecx
push edi
call fcn.0058aba0
add esp, 0xc
mov dword [edi + 0x14], eax
test eax, eax
je 0x58b2f6
xor esi, esi
test ebx, ebx
jle 0x58af61
lea esp, [esp]
push edi
call fcn.00588920
mov ecx, dword [edi + 0x14]
add esp, 4
mov dword [edi + 0x508], 0
mov byte [esi + ecx], al
inc esi
cmp esi, ebx
jl 0x58af40
mov eax, dword [edi + 0x14]
push edi
mov byte [eax + ebx], 0
call fcn.00588870
add esp, 4
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], 0
test eax, eax
jle 0x58afb2
cmp eax, 0x1fffffff
jg 0x58b2ef
lea esi, [eax*4]
push esi
push edi
call fcn.0058aba0
add esp, 8
mov dword [edi + 0x1c], eax
test eax, eax
je 0x58b2ef
push esi
push 0
push eax
call sym.BZDPatcher.exe_SDL_memset
mov eax, dword [edi + 0x18]
add esp, 0xc
xor ebx, ebx
test eax, eax
jle 0x58b02b
push edi
call fcn.00588870
mov dword [ebp - 0x43c], eax
lea ecx, [eax + 1]
push ecx
push edi
call fcn.0058aba0
mov ecx, dword [edi + 0x1c]
add esp, 0xc
mov dword [ecx + ebx*4], eax
mov eax, dword [edi + 0x1c]
cmp dword [eax + ebx*4], 0
je 0x58b2f6
mov ecx, dword [ebp - 0x43c]
xor esi, esi
test ecx, ecx
jle 0x58b01e
push edi
call fcn.00588920
mov ecx, dword [edi + 0x1c]
add esp, 4
mov dword [edi + 0x508], 0
mov ecx, dword [ecx + ebx*4]
mov byte [esi + ecx], al
inc esi
cmp esi, dword [ebp - 0x43c]
jl 0x58aff0
mov eax, dword [edi + 0x1c]
mov ecx, dword [ebp - 0x43c]
mov eax, dword [eax + ebx*4]
inc ebx
mov byte [ecx + eax], 0
cmp ebx, dword [edi + 0x18]
jl 0x58afb8
push edi
call fcn.00588920
add esp, 4
mov dword [edi + 0x508], 0
test al, 1
je 0x58b459
movzx eax, byte [edi + 0x4f4]
push 1
cdq
push edx
push eax
push dword [edi + 0x20]
call sym.BZDPatcher.exe_SDL_RWseek
add esp, 0x10
mov byte [edi + 0x4f4], 0
push edi
call fcn.0058a170
mov esi, eax
cdq
push 1
push edx
push eax
push dword [edi + 0x20]
call sym.BZDPatcher.exe_SDL_RWseek
add esp, 0x14
mov byte [edi + 0x4f4], 0
test esi, esi
jne 0x58b064
push edi
call fcn.0058c830
add esp, 4
test eax, eax
je 0x58b460
xor ebx, ebx
lea ebx, [ebx]
mov eax, ebx
shl eax, 0x18
cmp eax, 0x80000000
sbb ecx, ecx
add eax, eax
and ecx, 0xfb3ee249
add ecx, 0x4c11db7
xor ecx, eax
cmp ecx, 0x80000000
sbb edx, edx
and edx, 0xfb3ee249
lea eax, [ecx + ecx]
add edx, 0x4c11db7
xor edx, eax
cmp edx, 0x80000000
sbb ecx, ecx
and ecx, 0xfb3ee249
lea eax, [edx + edx]
add ecx, 0x4c11db7
xor ecx, eax
cmp ecx, 0x80000000
sbb edx, edx
and edx, 0xfb3ee249
lea eax, [ecx + ecx]
add edx, 0x4c11db7
xor edx, eax
cmp edx, 0x80000000
sbb ecx, ecx
and ecx, 0xfb3ee249
lea eax, [edx + edx]
add ecx, 0x4c11db7
xor ecx, eax
cmp ecx, 0x80000000
sbb edx, edx
and edx, 0xfb3ee249
lea eax, [ecx + ecx]
add edx, 0x4c11db7
xor edx, eax
cmp edx, 0x80000000
sbb esi, esi
and esi, 0xfb3ee249
lea eax, [edx + edx]
add esi, 0x4c11db7
xor esi, eax
cmp esi, 0x80000000
sbb ecx, ecx
and ecx, 0xfb3ee249
lea eax, [esi + esi]
add ecx, 0x4c11db7
xor ecx, eax
mov dword [ebx*4 + 0x67c098], ecx
inc ebx
cmp ebx, 0x100
jl 0x58b0a0
push edi
call fcn.00588920
add esp, 4
mov dword [edi + 0x508], 0
cmp eax, 5
jne 0x58b459
xor esi, esi
lea ecx, [ecx]
push edi
call fcn.00588920
mov byte [ebp + esi - 0xc], al
add esp, 4
inc esi
mov dword [edi + 0x508], 0
cmp esi, 6
jl 0x58b1a0
lea eax, [ebp - 0xc]
push eax
call fcn.0058e7d0
add esp, 4
test eax, eax
je 0x58b459
push 8
push edi
call fcn.00588990
inc eax
add esp, 8
cmp dword [edi + 0x508], 0
mov dword [edi + 0x84], eax
jl 0x58ad91
imul eax, eax, 0x830
push eax
push edi
call fcn.0058aba0
mov ecx, eax
add esp, 8
mov dword [edi + 0x88], ecx
test ecx, ecx
je 0x58b2f6
imul eax, dword [edi + 0x84], 0x830
push eax
push 0
push ecx
call sym.BZDPatcher.exe_SDL_memset
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x444], eax
cmp dword [edi + 0x84], eax
jle 0x58ba0a
lea ebx, [ebx]
imul esi, eax, 0x830
push 8
push edi
mov dword [ebp - 0x43c], 0
add esi, dword [edi + 0x88]
call fcn.00588990
add esp, 8
cmp al, 0x42
jne 0x58b459
push 8
push edi
call fcn.00588990
add esp, 8
cmp al, 0x43
jne 0x58b459
push 8
push edi
call fcn.00588990
add esp, 8
cmp al, 0x56
jne 0x58b459
push 8
push edi
call fcn.00588990
push 8
push edi
mov bl, al
call fcn.00588990
shl eax, 8
movzx ecx, bl
add eax, ecx
push 8
push edi
mov dword [esi], eax
call fcn.00588990
push 8
push edi
mov bh, al
call fcn.00588990
push 8
push edi
mov bl, al
call fcn.00588990
shl eax, 8
movzx ecx, bl
add eax, ecx
movzx ecx, bh
shl eax, 8
add eax, ecx
push 1
push edi
mov dword [esi + 4], eax
call fcn.00588990
mov ebx, eax
add esp, 0x30
test ebx, ebx
je 0x58b310
xor eax, eax
jmp 0x58b31b
mov dword [edi + 0x18], 0
mov dword [edi + 0x70], 3
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a10
mov esp, ebp
pop ebp
ret
push 1
push edi
call fcn.00588990
add esp, 8
cmp dword [esi], 0
mov byte [esi + 0x17], al
jne 0x58b32d
cmp dword [esi + 4], 0
jne 0x58b459
cmp dword [edi + 0x508], 0
jl 0x58ad91
mov ecx, dword [esi + 4]
push ecx
push edi
test al, al
je 0x58b350
call fcn.0058ac20
mov dword [edi + 0x530], eax
jmp 0x58b358
call fcn.0058aba0
mov dword [esi + 8], eax
add esp, 8
mov dword [ebp - 0x44c], eax
test eax, eax
je 0x58b2f6
test ebx, ebx
je 0x58b3ff
push 5
push edi
xor ebx, ebx
call fcn.00588990
mov ecx, dword [esi + 4]
inc eax
add esp, 8
mov dword [ebp - 0x448], eax
mov edx, ecx
test ecx, ecx
jle 0x58b487
mov edi, edi
sub ecx, ebx
push ecx
call fcn.00588c20
push eax
push edi
call fcn.00588990
add esp, 0xc
mov edx, eax
cmp dword [edi + 0x508], 0
jl 0x58ad91
mov eax, dword [ebp - 0x448]
cmp eax, 0x20
jge 0x58b459
lea ecx, [edx + ebx]
mov dword [ebp - 0x440], ecx
cmp ecx, dword [esi + 4]
jg 0x58b459
push edx
push eax
mov eax, dword [ebp - 0x44c]
add eax, ebx
push eax
call sym.BZDPatcher.exe_SDL_memset
mov ecx, dword [esi + 4]
add esp, 0xc
mov ebx, dword [ebp - 0x440]
mov edx, ecx
inc dword [ebp - 0x448]
cmp ebx, ecx
jl 0x58b390
jmp 0x58b487
mov ecx, dword [esi + 4]
xor ebx, ebx
mov edx, ecx
test ecx, ecx
jle 0x58b487
lea ebx, [ebx]
cmp byte [esi + 0x17], 0
je 0x58b423
push 1
push edi
call fcn.00588990
add esp, 8
jmp 0x58b428
mov eax, 1
cmp dword [edi + 0x508], 0
jl 0x58ad91
test eax, eax
je 0x58b473
push 5
push edi
call fcn.00588990
mov ecx, dword [ebp - 0x44c]
add al, 1
inc dword [ebp - 0x43c]
add esp, 8
mov byte [ecx + ebx], al
cmp al, 0x20
jne 0x58b47d
mov dword [edi + 0x70], 0x14
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a10
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x44c]
mov byte [eax + ebx], 0xff
mov ecx, dword [esi + 4]
inc ebx
mov edx, ecx
cmp ebx, ecx
jl 0x58b410
mov al, byte [esi + 0x17]
mov ebx, dword [ebp - 0x43c]
mov byte [ebp - 0x435], al
test al, al
je 0x58b501
mov eax, ecx
sar eax, 2
cmp ebx, eax
jl 0x58b4f7
cmp ecx, dword [edi + 0x10]
jle 0x58b4ae
mov dword [edi + 0x10], ecx
mov ecx, dword [esi + 4]
push ecx
push edi
call fcn.0058aba0
add esp, 8
mov dword [esi + 8], eax
test eax, eax
je 0x58b2f6
push dword [esi + 4]
push dword [ebp - 0x44c]
push eax
call sym.BZDPatcher.exe_SDL_memcpy
push dword [esi + 4]
lea eax, [edi + 0x530]
push eax
push edi
call fcn.0058abf0
mov ecx, dword [esi + 8]
add esp, 0x18
mov edx, dword [esi + 4]
mov dword [ebp - 0x44c], ecx
mov byte [esi + 0x17], 0
jmp 0x58b507
mov al, byte [ebp - 0x435]
test al, al
jne 0x58b54c
mov ecx, dword [ebp - 0x44c]
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x43c], ebx
test edx, edx
jle 0x58b54c
jmp 0x58b520
mov bl, byte [ecx + eax]
mov byte [ebp - 0x435], bl
cmp bl, 0xa
mov ebx, dword [ebp - 0x43c]
jbe 0x58b544
cmp byte [ebp - 0x435], 0xff
je 0x58b544
inc ebx
mov dword [ebp - 0x43c], ebx
inc eax
cmp eax, edx
jl 0x58b520
mov al, byte [esi + 0x17]
mov dword [esi + 0x82c], ebx
mov dword [ebp - 0x448], 0
test al, al
jne 0x58b57d
mov eax, dword [esi + 4]
shl eax, 2
push eax
push edi
call fcn.0058aba0
add esp, 8
mov dword [esi + 0x20], eax
test eax, eax
je 0x58b2f6
jmp 0x58b5f7
test ebx, ebx
je 0x58b5e3
push ebx
push edi
call fcn.0058aba0
add esp, 8
mov dword [esi + 8], eax
test eax, eax
je 0x58b2f6
mov eax, dword [esi + 0x82c]
shl eax, 2
push eax
push edi
call fcn.0058ac20
mov dword [esi + 0x20], eax
add esp, 8
mov dword [edi + 0x534], eax
cmp dword [esi + 0x20], 0
je 0x58b2f6
mov eax, dword [esi + 0x82c]
shl eax, 2
push eax
push edi
call fcn.0058ac20
add esp, 8
mov dword [ebp - 0x448], eax
mov dword [edi + 0x538], eax
test eax, eax
je 0x58b2f6
mov edx, dword [esi + 0x82c]
mov ecx, dword [esi + 4]
lea eax, [ecx + edx*8]
cmp eax, dword [edi + 0x10]
jbe 0x58b5f7
mov dword [edi + 0x10], eax
push dword [ebp - 0x448]
mov ebx, dword [ebp - 0x44c]
push dword [esi + 4]
push ebx
push esi
call fcn.00587690
add esp, 0x10
test eax, eax
je 0x58b459
mov eax, dword [esi + 0x82c]
test eax, eax
je 0x58b686
lea eax, [eax*4 + 4]
push eax
push edi
call fcn.0058aba0
add esp, 8
mov dword [esi + 0x824], eax
test eax, eax
je 0x58b2f6
mov eax, dword [esi + 0x82c]
lea eax, [eax*4 + 4]
push eax
push edi
call fcn.0058aba0
add esp, 8
mov dword [esi + 0x828], eax
test eax, eax
je 0x58b2f6
push dword [ebp - 0x448]
add eax, 4
push ebx
mov dword [esi + 0x828], eax
push esi
mov dword [eax - 4], 0xffffffff
call fcn.005878d0
add esp, 0xc
cmp byte [esi + 0x17], 0
je 0x58b6d4
mov eax, dword [esi + 0x82c]
shl eax, 2
push eax
lea eax, [edi + 0x538]
push eax
push edi
call fcn.0058abf0
mov eax, dword [esi + 0x82c]
shl eax, 2
push eax
lea eax, [edi + 0x534]
push eax
push edi
call fcn.0058abf0
push dword [esi + 4]
lea eax, [edi + 0x530]
push eax
push edi
call fcn.0058abf0
add esp, 0x24
mov dword [esi + 0x20], 0
push esi
call fcn.00587590
push 4
push edi
call fcn.00588990
add esp, 0xc
mov byte [esi + 0x15], al
cmp al, 2
ja 0x58b459
test al, al
je 0x58b9f1
push 0x20
push edi
call fcn.00588990
push eax
call fcn.005886e0
push 0x20
push edi
fstp dword [esi + 0xc]
call fcn.00588990
push eax
call fcn.005886e0
push 4
push edi
fstp dword [esi + 0x10]
call fcn.00588990
inc al
push 1
push edi
mov byte [esi + 0x14], al
call fcn.00588990
add esp, 0x28
mov byte [esi + 0x16], al
cmp byte [esi + 0x15], 1
jne 0x58b752
push dword [esi]
push dword [esi + 4]
call fcn.00589fa0
add esp, 8
test eax, eax
js 0x58b459
jmp 0x58b758
mov eax, dword [esi]
imul eax, dword [esi + 4]
mov dword [esi + 0x18], eax
test eax, eax
je 0x58b459
add eax, eax
push eax
push edi
call fcn.0058ac20
add esp, 8
mov dword [ebp - 0x44c], eax
mov dword [edi + 0x53c], eax
test eax, eax
je 0x58b2f6
mov eax, dword [esi + 0x18]
xor ebx, ebx
test eax, eax
jle 0x58b7bd
lea esp, [esp]
movzx eax, byte [esi + 0x14]
push eax
push edi
call fcn.00588990
add esp, 8
cmp dword [edi + 0x508], 0
jl 0x58b459
mov ecx, dword [ebp - 0x44c]
mov word [ecx + ebx*2], ax
inc ebx
mov eax, dword [esi + 0x18]
cmp ebx, eax
jl 0x58b790
cmp byte [esi + 0x15], 1
jne 0x58b944
mov bl, byte [esi + 0x17]
mov byte [ebp - 0x435], bl
mov dword [ebp - 0x468], 0
test bl, bl
je 0x58b7f3
mov ecx, dword [esi + 0x82c]
test ecx, ecx
je 0x58b9de
mov eax, dword [esi]
imul eax, ecx
jmp 0x58b7f9
mov eax, dword [esi]
imul eax, dword [esi + 4]
shl eax, 2
push eax
push edi
call fcn.0058aba0
add esp, 8
mov dword [esi + 0x1c], eax
test eax, eax
je 0x58b2f6
test bl, bl
je 0x58b81d
mov eax, dword [esi + 0x82c]
jmp 0x58b820
mov eax, dword [esi + 4]
xor ecx, ecx
mov dword [ebp - 0x450], eax
mov dword [ebp - 0x43c], ecx
test eax, eax
jle 0x58b938
test bl, bl
je 0x58b84b
mov eax, dword [esi + 0x828]
mov eax, dword [eax + ecx*4]
mov dword [ebp - 0x454], eax
jmp 0x58b853
mov eax, ecx
mov dword [ebp - 0x454], ecx
mov ebx, dword [esi]
mov ecx, 1
mov dword [ebp - 0x448], 0
test ebx, ebx
jle 0x58b919
lea esp, [esp]
xor edx, edx
mov edi, dword [ebp - 0x44c]
div ecx
xor edx, edx
imul ebx, dword [ebp - 0x43c]
div dword [esi + 0x18]
movzx eax, word [edi + edx*2]
mov edx, dword [ebp - 0x448]
add ebx, edx
mov dword [ebp - 0x440], eax
fild dword [ebp - 0x440]
mov edi, dword [ebp - 0x458]
fstp qword [ebp - 0x460]
fld qword [ebp - 0x460]
fmul dword [esi + 0x10]
mov eax, dword [esi + 0x1c]
fadd dword [esi + 0xc]
fadd dword [ebp - 0x468]
fstp dword [ebp - 0x464]
fld dword [ebp - 0x464]
fstp dword [eax + ebx*4]
cmp byte [esi + 0x16], 0
je 0x58b8e4
movss xmm0, dword [ebp - 0x464]
movss dword [ebp - 0x468], xmm0
mov ebx, dword [esi]
inc edx
mov dword [ebp - 0x448], edx
cmp edx, ebx
jge 0x58b90d
or eax, 0xffffffff
xor edx, edx
div dword [esi + 0x18]
cmp ecx, eax
ja 0x58b459
imul ecx, dword [esi + 0x18]
mov edx, dword [ebp - 0x448]
cmp edx, ebx
mov eax, dword [ebp - 0x454]
jl 0x58b870
mov ecx, dword [ebp - 0x43c]
mov bl, byte [ebp - 0x435]
inc ecx
mov dword [ebp - 0x43c], ecx
cmp ecx, dword [ebp - 0x450]
jl 0x58b836
mov eax, dword [esi + 0x18]
mov byte [esi + 0x15], 2
jmp 0x58b9de
shl eax, 2
push eax
push edi
mov dword [ebp - 0x454], 0
call fcn.0058aba0
add esp, 8
mov dword [esi + 0x1c], eax
test eax, eax
je 0x58b2f6
mov eax, dword [esi + 0x18]
xor ecx, ecx
test eax, eax
jle 0x58b9de
mov edi, dword [ebp - 0x44c]
jmp 0x58b980
movzx eax, word [edi + ecx*2]
mov dword [ebp - 0x440], eax
fild dword [ebp - 0x440]
fstp qword [ebp - 0x460]
fld qword [ebp - 0x460]
fmul dword [esi + 0x10]
mov eax, dword [esi + 0x1c]
fadd dword [esi + 0xc]
fadd dword [ebp - 0x454]
fstp dword [ebp - 0x450]
fld dword [ebp - 0x450]
fstp dword [eax + ecx*4]
cmp byte [esi + 0x16], 0
je 0x58b9d0
movss xmm0, dword [ebp - 0x450]
movss dword [ebp - 0x454], xmm0
mov eax, dword [esi + 0x18]
inc ecx
cmp ecx, eax
jl 0x58b980
mov edi, dword [ebp - 0x458]
add eax, eax
push eax
lea eax, [edi + 0x53c]
push eax
push edi
call fcn.0058abf0
add esp, 0xc
mov eax, dword [ebp - 0x444]
inc eax
mov dword [ebp - 0x444], eax
cmp eax, dword [edi + 0x84]
jl 0x58b240
push 6
push edi
xor esi, esi
call fcn.00588990
add esp, 8
add al, 1
movzx ebx, al
je 0x58ba38
mov edi, edi
push 0x10
push edi
call fcn.00588990
add esp, 8
test eax, eax
jne 0x58b459
inc esi
cmp esi, ebx
jl 0x58ba20
push 6
push edi
call fcn.00588990
inc eax
add esp, 8
cmp dword [edi + 0x508], 0
mov dword [edi + 0x8c], eax
jl 0x58ad91
imul eax, eax, 0x63c
push eax
push edi
call fcn.0058aba0
add esp, 8
mov dword [edi + 0x110], eax
test eax, eax
je 0x58b2f6
cmp dword [edi + 0x8c], 0
mov dword [ebp - 0x468], 0
jle 0x58be93
xor esi, esi
lea ebx, [edi + 0x90]
mov dword [ebp - 0x440], esi
mov dword [ebp - 0x464], ebx
push 0x10
push edi
call fcn.00588990
movzx eax, ax
add esp, 8
mov word [ebx], ax
cmp eax, 1
ja 0x58b459
mov ebx, dword [edi + 0x110]
add ebx, esi
mov dword [ebp - 0x45c], ebx
test ax, ax
je 0x58c0af
push 5
push edi
mov dword [ebp - 0x44c], 0xffffffff
call fcn.00588990
add esp, 8
mov byte [ebx], al
mov dword [ebp - 0x444], 0
test al, al
je 0x58bb35
mov ecx, dword [ebp - 0x44c]
lea esp, [esp]
push 4
push edi
mov esi, ecx
call fcn.00588990
mov edx, dword [ebp - 0x444]
add esp, 8
movzx ecx, al
cmp ecx, esi
mov byte [ebx + edx + 1], al
cmovle ecx, esi
movzx eax, byte [ebx]
inc edx
mov dword [ebp - 0x444], edx
cmp edx, eax
jl 0x58bb00
mov dword [ebp - 0x44c], ecx
jmp 0x58bb38
or ecx, 0xffffffff
xor esi, esi
mov dword [ebp - 0x448], esi
test ecx, ecx
js 0x58bc21
lea eax, [ebx + 0x52]
mov dword [ebp - 0x43c], eax
push 3
push edi
call fcn.00588990
inc al
push 2
push edi
mov byte [ebx + esi + 0x21], al
call fcn.00588990
add esp, 0x10
mov byte [ebx + esi + 0x31], al
cmp dword [edi + 0x508], 0
jl 0x58ad91
test al, al
je 0x58bb9d
push 8
push edi
call fcn.00588990
mov byte [ebx + esi + 0x41], al
add esp, 8
movzx eax, al
cmp eax, dword [edi + 0x84]
jge 0x58b459
mov cl, byte [ebx + esi + 0x31]
mov eax, 1
shl eax, cl
mov dword [ebp - 0x444], 0
test eax, eax
jle 0x58bc07
mov esi, dword [ebp - 0x43c]
lea esp, [esp]
push 8
push edi
call fcn.00588990
dec eax
add esp, 8
mov word [esi], ax
cwde
cmp eax, dword [edi + 0x84]
jge 0x58b459
mov ecx, dword [ebp - 0x448]
mov eax, 1
mov edx, dword [ebp - 0x444]
add esi, 2
inc edx
mov dword [ebp - 0x444], edx
mov cl, byte [ebx + ecx + 0x31]
shl eax, cl
cmp edx, eax
jl 0x58bbc0
mov esi, dword [ebp - 0x448]
add dword [ebp - 0x43c], 0x10
inc esi
mov dword [ebp - 0x448], esi
cmp esi, dword [ebp - 0x44c]
jle 0x58bb51
push 2
push edi
call fcn.00588990
inc al
push 4
push edi
mov byte [ebx + 0x634], al
call fcn.00588990
mov byte [ebx + 0x635], al
lea edx, [ebx + 0x152]
xor eax, eax
xor esi, esi
mov word [edx], ax
add esp, 0x10
mov cl, byte [ebx + 0x635]
mov eax, 1
shl ax, cl
mov word [ebx + 0x154], ax
lea ecx, [esi + 2]
cmp byte [ebx], 0
mov dword [ebx + 0x638], 2
mov dword [ebp - 0x444], esi
jbe 0x58bcf2
lea esp, [esp]
movzx eax, byte [ebx + esi + 1]
xor esi, esi
mov dword [ebp - 0x450], eax
cmp byte [eax + ebx + 0x21], 0
jbe 0x58bcd2
movzx eax, byte [ebx + 0x635]
push eax
push edi
call fcn.00588990
mov ecx, dword [ebx + 0x638]
inc esi
add esp, 8
mov word [ebx + ecx*2 + 0x152], ax
mov ecx, dword [ebx + 0x638]
mov eax, dword [ebp - 0x450]
inc ecx
mov dword [ebx + 0x638], ecx
movzx eax, byte [eax + ebx + 0x21]
cmp esi, eax
jl 0x58bc94
jmp 0x58bcd8
mov ecx, dword [ebx + 0x638]
mov esi, dword [ebp - 0x444]
movzx eax, byte [ebx]
inc esi
mov dword [ebp - 0x444], esi
cmp esi, eax
jl 0x58bc80
lea edx, [ebx + 0x152]
xor esi, esi
test ecx, ecx
jle 0x58bd21
jmp 0x58bd00
mov ax, word [edx]
lea edx, [edx + 2]
mov word [ebp + esi*4 - 0x434], ax
mov word [ebp + esi*4 - 0x432], si
inc esi
mov ecx, dword [ebx + 0x638]
cmp esi, ecx
jl 0x58bd00
push 0x58a220
push 4
push ecx
lea eax, [ebp - 0x434]
push eax
call sym.BZDPatcher.exe_SDL_qsort
mov ecx, dword [ebx + 0x638]
add esp, 0x10
xor edx, edx
lea esi, [ecx - 1]
test esi, esi
jle 0x58bd6b
jmp 0x58bd50
mov ax, word [ebp + edx*4 - 0x434]
cmp ax, word [ebp + edx*4 - 0x430]
je 0x58b459
inc edx
cmp edx, esi
jl 0x58bd50
xor edx, edx
test ecx, ecx
jle 0x58bd8a
mov al, byte [ebp + edx*4 - 0x432]
mov byte [ebx + edx + 0x346], al
inc edx
mov ecx, dword [ebx + 0x638]
cmp edx, ecx
jl 0x58bd71
mov edx, 2
cmp ecx, edx
jle 0x58be3e
lea edi, [ebx + 0x152]
lea ecx, [ecx]
xor ecx, ecx
mov dword [ebp - 0x454], 0
xor eax, eax
mov dword [ebp - 0x450], ecx
mov dword [ebp - 0x444], 0xffffffff
mov dword [ebp - 0x448], 0x10000
test edx, edx
jle 0x58be15
mov ebx, dword [ebp - 0x448]
movzx esi, word [edi + eax*2]
mov ecx, esi
cmp ecx, dword [ebp - 0x444]
jle 0x58bdf2
cmp si, word [edi + edx*2]
jae 0x58bdf2
mov dword [ebp - 0x454], eax
mov dword [ebp - 0x444], ecx
cmp ecx, ebx
jge 0x58be04
cmp si, word [edi + edx*2]
jbe 0x58be04
mov dword [ebp - 0x450], eax
mov ebx, ecx
inc eax
cmp eax, edx
jl 0x58bdd2
mov ebx, dword [ebp - 0x45c]
mov ecx, dword [ebp - 0x450]
mov eax, dword [ebp - 0x454]
mov byte [ebx + edx*2 + 0x440], al
mov byte [ebx + edx*2 + 0x441], cl
inc edx
mov ecx, dword [ebx + 0x638]
cmp edx, ecx
jl 0x58bda0
mov edi, dword [ebp - 0x458]
cmp ecx, dword [ebp - 0x470]
mov eax, dword [ebp - 0x468]
cmovle ecx, dword [ebp - 0x470]
inc eax
mov ebx, dword [ebp - 0x464]
mov edx, ecx
mov esi, dword [ebp - 0x440]
add ebx, 2
add esi, 0x63c
mov dword [ebp - 0x470], edx
mov dword [ebp - 0x468], eax
mov dword [ebp - 0x464], ebx
mov dword [ebp - 0x440], esi
cmp eax, dword [edi + 0x8c]
jl 0x58baa0
mov dword [ebp - 0x470], edx
push 6
push edi
call fcn.00588990
inc eax
add esp, 8
cmp dword [edi + 0x508], 0
mov dword [edi + 0x114], eax
jl 0x58ad91
lea eax, [eax + eax*2]
shl eax, 3
push eax
push edi
call fcn.0058aba0
mov ecx, eax
add esp, 8
mov dword [edi + 0x198], ecx
test ecx, ecx
je 0x58b2f6
mov eax, dword [edi + 0x114]
lea eax, [eax + eax*2]
shl eax, 3
push eax
push 0
push ecx
call sym.BZDPatcher.exe_SDL_memset
add esp, 0xc
mov dword [ebp - 0x450], 0
cmp dword [edi + 0x114], 0
jle 0x58c2b9
xor eax, eax
lea ebx, [edi + 0x118]
mov dword [ebp - 0x454], eax
mov dword [ebp - 0x44c], ebx
mov esi, dword [edi + 0x198]
push 0x10
push edi
add esi, eax
call fcn.00588990
movzx eax, ax
add esp, 8
mov word [ebx], ax
cmp eax, 2
ja 0x58b459
push 0x18
push edi
call fcn.00588990
push 0x18
push edi
mov dword [esi], eax
call fcn.00588990
add esp, 0x10
mov dword [esi + 4], eax
cmp eax, dword [esi]
jb 0x58b459
push 0x18
push edi
call fcn.00588990
inc eax
push 6
push edi
mov dword [esi + 8], eax
call fcn.00588990
inc al
push 8
push edi
mov byte [esi + 0xc], al
call fcn.00588990
mov byte [esi + 0xd], al
add esp, 0x18
mov ecx, dword [edi + 0x508]
test ecx, ecx
js 0x58ad91
movzx eax, al
cmp eax, dword [edi + 0x84]
jge 0x58b459
mov dl, byte [esi + 0xc]
mov dword [ebp - 0x440], 0
test dl, dl
je 0x58bffe
lea esp, [esp]
push 3
push edi
xor bl, bl
call fcn.00588990
push 1
push edi
mov bh, al
call fcn.00588990
add esp, 0x10
test eax, eax
je 0x58bfd8
push 5
push edi
call fcn.00588990
add esp, 8
mov bl, al
mov ecx, dword [ebp - 0x440]
mov dl, byte [esi + 0xc]
shl bl, 3
add bl, bh
movzx eax, dl
mov byte [ebp + ecx - 0x4c], bl
inc ecx
mov dword [ebp - 0x440], ecx
cmp ecx, eax
jl 0x58bfb0
mov ecx, dword [edi + 0x508]
test ecx, ecx
js 0x58ad91
movzx eax, dl
shl eax, 4
push eax
push edi
call fcn.0058aba0
add esp, 8
mov dword [esi + 0x14], eax
test eax, eax
je 0x58b2f6
xor edx, edx
mov dword [ebp - 0x444], edx
cmp byte [esi + 0xc], dl
jbe 0x58c165
movzx eax, byte [ebp + edx - 0x4c]
xor ecx, ecx
mov dword [ebp - 0x440], ecx
mov dword [ebp - 0x45c], eax
jmp 0x58c050
mov edi, dword [ebp - 0x458]
lea ebx, [ecx + edx*8]
mov eax, 1
shl eax, cl
test dword [ebp - 0x45c], eax
je 0x58c132
push 8
push edi
call fcn.00588990
mov ecx, dword [esi + 0x14]
add esp, 8
mov word [ecx + ebx*2], ax
cmp dword [edi + 0x508], 0
jl 0x58ad91
mov eax, dword [esi + 0x14]
movsx eax, word [eax + ebx*2]
cmp eax, dword [edi + 0x84]
jge 0x58b459
mov ecx, dword [ebp - 0x440]
mov edx, dword [ebp - 0x444]
jmp 0x58c142
push 8
push edi
call fcn.00588990
push 0x10
push edi
mov byte [ebx], al
call fcn.00588990
push 0x10
push edi
mov word [ebx + 2], ax
call fcn.00588990
push 6
push edi
mov word [ebx + 4], ax
call fcn.00588990
push 8
push edi
mov byte [ebx + 6], al
call fcn.00588990
push 4
push edi
mov byte [ebx + 7], al
call fcn.00588990
add esp, 0x30
mov esi, 0
add al, 1
mov byte [ebx + 8], al
je 0x58c118
mov edi, edi
push 8
push edi
call fcn.00588990
mov byte [ebx + esi + 9], al
add esp, 8
movzx eax, byte [ebx + 8]
inc esi
cmp esi, eax
jl 0x58c100
mov dword [edi + 0x70], 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a10
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x14]
or edi, 0xffffffff
mov word [eax + ebx*2], di
mov edi, dword [ebp - 0x458]
inc ecx
mov dword [ebp - 0x440], ecx
cmp ecx, 8
jl 0x58c050
movzx eax, byte [esi + 0xc]
inc edx
mov dword [ebp - 0x444], edx
cmp edx, eax
jl 0x58c032
movzx eax, byte [esi + 0xd]
imul ecx, eax, 0x830
mov eax, dword [edi + 0x88]
mov eax, dword [ecx + eax + 4]
shl eax, 2
push eax
push edi
call fcn.0058aba0
add esp, 8
mov dword [esi + 0x10], eax
test eax, eax
je 0x58b2f6
movzx ecx, byte [esi + 0xd]
imul edx, ecx, 0x830
mov ecx, dword [edi + 0x88]
mov ecx, dword [edx + ecx + 4]
shl ecx, 2
push ecx
push 0
push eax
call sym.BZDPatcher.exe_SDL_memset
mov cl, byte [esi + 0xd]
xor ebx, ebx
mov edx, dword [edi + 0x88]
add esp, 0xc
movzx eax, cl
imul eax, eax, 0x830
mov dword [ebp - 0x43c], ebx
cmp dword [eax + edx + 4], ebx
jle 0x58c283
jmp 0x58c1e0
movzx eax, cl
imul eax, eax, 0x830
mov dword [ebp - 0x448], ebx
mov ecx, dword [eax + edx]
push ecx
push edi
mov dword [ebp - 0x45c], ecx
call fcn.0058aba0
mov ecx, dword [esi + 0x10]
add esp, 8
mov dword [ecx + ebx*4], eax
mov eax, dword [esi + 0x10]
cmp dword [eax + ebx*4], 0
je 0x58b2f6
mov ebx, dword [ebp - 0x45c]
add ebx, 0xffffffff
js 0x58c25a
movzx ecx, byte [esi + 0xc]
mov edi, dword [ebp - 0x43c]
mov eax, dword [ebp - 0x448]
cdq
idiv ecx
mov ecx, dword [esi + 0x10]
mov eax, dword [ebp - 0x448]
mov ecx, dword [ecx + edi*4]
mov byte [ebx + ecx], dl
movzx ecx, byte [esi + 0xc]
cdq
idiv ecx
sub ebx, 1
mov dword [ebp - 0x448], eax
jns 0x58c230
mov edi, dword [ebp - 0x458]
mov cl, byte [esi + 0xd]
mov ebx, dword [ebp - 0x43c]
mov edx, dword [edi + 0x88]
inc ebx
movzx eax, cl
imul eax, eax, 0x830
mov dword [ebp - 0x43c], ebx
cmp ebx, dword [eax + edx + 4]
jl 0x58c1e0
mov ebx, dword [ebp - 0x450]
mov eax, dword [ebp - 0x454]
inc ebx
add dword [ebp - 0x44c], 2
add eax, 0x18
mov dword [ebp - 0x450], ebx
mov dword [ebp - 0x454], eax
cmp ebx, dword [edi + 0x114]
jge 0x58c2b9
mov ebx, dword [ebp - 0x44c]
jmp 0x58bf15
push 6
push edi
call fcn.00588990
inc eax
add esp, 8
cmp dword [edi + 0x508], 0
mov dword [edi + 0x19c], eax
jl 0x58ad91
lea eax, [eax + eax*4]
shl eax, 3
push eax
push edi
call fcn.0058aba0
mov ecx, eax
add esp, 8
mov dword [edi + 0x1a0], ecx
test ecx, ecx
je 0x58b2f6
mov eax, dword [edi + 0x19c]
lea eax, [eax + eax*4]
shl eax, 3
push eax
push 0
push ecx
call sym.BZDPatcher.exe_SDL_memset
add esp, 0xc
mov dword [ebp - 0x444], 0
cmp dword [edi + 0x19c], 0
jle 0x58c587
xor ecx, ecx
mov dword [ebp - 0x450], ecx
nop
mov esi, dword [edi + 0x1a0]
mov ebx, dword [ebp - 0x46c]
add esi, ecx
push 0x10
push edi
call fcn.00588990
add esp, 8
test eax, eax
jne 0x58b459
mov eax, dword [edi + 4]
lea eax, [eax + eax*2]
push eax
push edi
call fcn.0058aba0
add esp, 8
mov dword [esi], eax
test eax, eax
je 0x58b2f6
push 1
push edi
call fcn.00588990
add esp, 8
test eax, eax
je 0x58c389
push 4
push edi
call fcn.00588990
add esp, 8
add al, 1
jmp 0x58c38b
mov al, 1
mov byte [esi + 6], al
movzx eax, al
cmp eax, ebx
push 1
cmovle eax, ebx
push edi
mov dword [ebp - 0x46c], eax
call fcn.00588990
add esp, 8
test eax, eax
je 0x58c46f
push 8
push edi
call fcn.00588990
inc eax
add esp, 8
mov word [esi + 4], ax
mov ecx, dword [edi + 4]
movzx eax, ax
cmp eax, ecx
jg 0x58b459
mov dword [ebp - 0x440], 0
test eax, eax
je 0x58c475
xor ebx, ebx
lea eax, [ecx - 1]
push eax
call fcn.00588c20
push eax
push edi
call fcn.00588990
mov ecx, dword [esi]
mov byte [ebx + ecx], al
mov eax, dword [edi + 4]
dec eax
push eax
call fcn.00588c20
push eax
push edi
call fcn.00588990
mov ecx, dword [esi]
add esp, 0x18
mov byte [ebx + ecx + 1], al
cmp dword [edi + 0x508], 0
jl 0x58ad91
mov edx, dword [esi]
mov ecx, dword [edi + 4]
mov al, byte [ebx + edx]
mov byte [ebp - 0x435], al
movzx eax, al
cmp eax, ecx
jge 0x58b459
mov dl, byte [ebx + edx + 1]
movzx eax, dl
cmp eax, ecx
jge 0x58b459
cmp byte [ebp - 0x435], dl
je 0x58b459
mov edx, dword [ebp - 0x440]
add ebx, 3
movzx eax, word [esi + 4]
inc edx
mov dword [ebp - 0x440], edx
cmp edx, eax
jl 0x58c3e1
jmp 0x58c475
xor eax, eax
mov word [esi + 4], ax
push 2
push edi
call fcn.00588990
add esp, 8
test eax, eax
jne 0x58b459
mov cl, byte [esi + 6]
mov eax, dword [edi + 4]
cmp cl, 1
jbe 0x58c4da
mov dword [ebp - 0x440], 0
test eax, eax
jle 0x58c4f5
xor ebx, ebx
push 4
push edi
call fcn.00588990
mov ecx, dword [esi]
add esp, 8
mov byte [ebx + ecx + 2], al
mov eax, dword [esi]
mov cl, byte [esi + 6]
cmp byte [ebx + eax + 2], cl
jae 0x58b459
mov eax, dword [ebp - 0x440]
add ebx, 3
inc eax
mov dword [ebp - 0x440], eax
cmp eax, dword [edi + 4]
jl 0x58c4a3
jmp 0x58c4f5
xor edx, edx
test eax, eax
jle 0x58c4f5
xor ecx, ecx
mov eax, dword [esi]
inc edx
mov byte [ecx + eax + 2], 0
add ecx, 3
cmp edx, dword [edi + 4]
jl 0x58c4e2
mov cl, byte [esi + 6]
test cl, cl
je 0x58c55f
mov eax, 0xfffffff9
lea ebx, [esi + 7]
sub eax, esi
mov dword [ebp - 0x45c], eax
lea esp, [esp]
push 8
push edi
call fcn.00588990
push 8
push edi
call fcn.00588990
push 8
push edi
mov byte [ebx], al
call fcn.00588990
movzx ecx, byte [ebx]
add esp, 0x18
mov byte [ebx + 0x10], al
cmp ecx, dword [edi + 0x8c]
jge 0x58b459
movzx eax, al
cmp eax, dword [edi + 0x114]
jge 0x58b459
mov ecx, dword [ebp - 0x45c]
inc ebx
movzx eax, byte [esi + 6]
add ecx, ebx
cmp ecx, eax
jl 0x58c510
mov eax, dword [ebp - 0x444]
mov ecx, dword [ebp - 0x450]
inc eax
add ecx, 0x28
mov dword [ebp - 0x444], eax
mov dword [ebp - 0x450], ecx
cmp eax, dword [edi + 0x19c]
jl 0x58c330
push 6
push edi
call fcn.00588990
inc eax
add esp, 8
xor ebx, ebx
mov dword [edi + 0x1a4], eax
test eax, eax
jle 0x58c612
lea esi, [edi + 0x1aa]
push 1
push edi
call fcn.00588990
push 0x10
push edi
mov byte [esi - 2], al
call fcn.00588990
push 0x10
push edi
mov word [esi], ax
call fcn.00588990
push 8
push edi
mov word [esi + 2], ax
call fcn.00588990
add esp, 0x20
mov byte [esi - 1], al
cmp dword [edi + 0x508], 0
jl 0x58ad91
cmp word [esi], 0
jne 0x58b459
cmp word [esi + 2], 0
jne 0x58b459
movzx eax, al
cmp eax, dword [edi + 0x19c]
jge 0x58b459
inc ebx
add esi, 6
cmp ebx, dword [edi + 0x1a4]
jl 0x58c5a5
push edi
call fcn.00588740
xor ebx, ebx
mov dword [edi + 0x38c], 0
add esp, 4
cmp dword [edi + 4], ebx
jle 0x58c6ad
lea esi, [edi + 0x32c]
mov eax, dword [edi + 0x80]
shl eax, 2
push eax
push edi
call fcn.0058aba0
mov dword [esi], eax
mov eax, dword [edi + 0x80]
shl eax, 2
shr eax, 1
push eax
push edi
call fcn.0058aba0
mov ecx, dword [ebp - 0x470]
mov dword [esi + 0x40], eax
lea eax, [ecx + ecx]
push eax
push edi
call fcn.0058aba0
mov ecx, dword [esi]
add esp, 0x18
mov dword [esi + 0x64], eax
test ecx, ecx
je 0x58b2f6
cmp dword [esi + 0x40], 0
je 0x58b2f6
test eax, eax
je 0x58b2f6
mov eax, dword [edi + 0x80]
shl eax, 2
push eax
push 0
push ecx
call sym.BZDPatcher.exe_SDL_memset
inc ebx
add esp, 0xc
add esi, 4
cmp ebx, dword [edi + 4]
jl 0x58c636
push dword [edi + 0x7c]
push 0
push edi
call fcn.00589440
add esp, 0xc
test eax, eax
je 0x58b460
push dword [edi + 0x80]
push 1
push edi
call fcn.00589440
add esp, 0xc
test eax, eax
je 0x58b460
mov eax, dword [edi + 0x7c]
xor esi, esi
mov dword [edi + 0x74], eax
mov eax, dword [edi + 0x80]
mov dword [edi + 0x78], eax
mov eax, dword [edi + 0x80]
lea ecx, [eax*4]
mov eax, dword [edi + 0x114]
shr ecx, 1
mov dword [ebp - 0x444], ecx
mov dword [ebp - 0x440], eax
test eax, eax
jle 0x58c785
mov ebx, dword [edi + 0x198]
lea eax, [edi + 0x118]
mov edi, dword [edi + 0x80]
mov dword [ebp - 0x46c], eax
lea ebx, [ebx]
cmp word [eax], 2
jne 0x58c73a
mov edx, edi
jmp 0x58c743
mov eax, edi
cdq
sub eax, edx
mov edx, eax
sar edx, 1
mov eax, dword [ebx + 4]
cmp eax, edx
mov ecx, dword [ebx]
cmovae eax, edx
cmp ecx, edx
cmovae ecx, edx
xor edx, edx
sub eax, ecx
div dword [ebx + 8]
cmp eax, esi
cmovg esi, eax
mov eax, dword [ebp - 0x46c]
add eax, 2
add ebx, 0x18
sub dword [ebp - 0x440], 1
mov dword [ebp - 0x46c], eax
jne 0x58c730
mov edi, dword [ebp - 0x458]
mov ecx, dword [ebp - 0x444]
inc esi
imul esi, dword [edi + 4]
shl esi, 2
mov dword [edi + 0xc], esi
cmp ecx, esi
jbe 0x58c799
mov dword [edi + 0xc], ecx
mov esi, ecx
cmp dword [edi + 0x5c], 0
je 0x58c7c8
mov eax, dword [edi + 0x64]
add eax, 0x540
add eax, esi
cmp eax, dword [edi + 0x68]
jbe 0x58c7e0
mov dword [edi + 0x70], 3
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a10
mov esp, ebp
pop ebp
ret
push esi
push edi
call fcn.0058aba0
add esp, 8
mov dword [edi + 0x52c], eax
test eax, eax
je 0x58b2f6
cmp dword [edi + 0x4f8], 0xffffffff
jne 0x58c810
push dword [edi + 0x20]
call sym.BZDPatcher.exe_SDL_RWtell
add esp, 4
sub eax, dword [edi + 0x24]
mov dword [edi + 0x40], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a10
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
mov dword [edi + 0x40], eax
xor ecx, ebp
pop edi
pop esi
mov eax, 1
pop ebx
call fcn.005b6a10
mov esp, ebp
pop ebp
ret