Function at 0x1005b750
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4a4
mov dword [ebp - 0x80], edx
lea edx, [ebp - 0xa4]
push esi
mov esi, ecx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x88], 0xff
call fcn.1005b240
test eax, eax
je 0x1005b7ad
mov eax, dword [esi + 4]
mov dword [ebp - 0x5c], eax
cdq
xor eax, edx
sub eax, edx
mov dword [esi + 4], eax
cmp eax, 0x1000000
jbe 0x1005b7b4
mov ecx, dword [0x10265504]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], str.too_large
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esi], 0x1000000
ja 0x1005b794
mov eax, dword [ebp - 0x98]
mov edx, dword [ebp - 0x84]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x88]
push ebx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x34], edx
push edi
mov edi, dword [ebp - 0xa0]
mov dword [ebp - 0x58], edi
cmp eax, 0xc
jne 0x1005b830
mov ebx, dword [ebp - 0xa4]
mov dword [ebp - 0x2c], ebx
cmp ebx, 0x18
jge 0x1005b84e
mov ecx, edi
mov eax, 0x55555556
sub ecx, edx
sub ecx, 0x18
imul ecx
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jmp 0x1005b847
mov ecx, dword [ebp - 0xa4]
mov dword [ebp - 0x2c], ecx
cmp ecx, 0x10
jge 0x1005b84e
mov ebx, edi
sub ebx, edx
sub ebx, eax
sar ebx, 2
mov dword [ebp - 0x18], ebx
test ebx, ebx
jne 0x1005b8c7
mov ecx, dword [esi + 0xa8]
sub ecx, dword [esi + 0xb4]
mov edx, dword [esi + 0xac]
add ecx, edx
lea eax, [ecx - 1]
cmp eax, 0x3ff
ja 0x1005c984
cmp edi, ecx
jl 0x1005c962
mov eax, edi
sub eax, ecx
cmp eax, 0x400
jg 0x1005c962
test eax, eax
je 0x1005b8c7
jns 0x1005b895
mov eax, dword [esi + 0xb0]
jmp 0x1005b8c1
cmp dword [esi + 0x10], 0
je 0x1005b8bf
mov ebx, dword [esi + 0xb0]
mov ecx, ebx
sub ecx, edx
cmp ecx, eax
jge 0x1005b8bf
sub eax, ecx
mov dword [esi + 0xac], ebx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
add esp, 8
jmp 0x1005b8c7
add eax, edx
mov dword [esi + 0xac], eax
cmp dword [ebp - 0x2c], 0x18
mov ecx, dword [ebp - 0x1c]
jne 0x1005b8df
cmp ecx, 0xff000000
jne 0x1005b8df
mov eax, 3
jmp 0x1005b8e9
xor eax, eax
test ecx, ecx
setne al
add eax, 3
mov dword [esi + 8], eax
mov ebx, dword [esi]
mov ecx, dword [esi + 4]
test ebx, ebx
js 0x1005c940
jne 0x1005b90a
lea eax, [ebx*4]
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], eax
jmp 0x1005b930
mov eax, 0x7fffffff
cdq
idiv ebx
cmp eax, 4
jl 0x1005c940
lea eax, [ebx*4]
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], eax
test eax, eax
js 0x1005c940
test ecx, ecx
js 0x1005c940
je 0x1005b94b
mov eax, 0x7fffffff
cdq
idiv ecx
cmp dword [ebp - 0x10], eax
jg 0x1005c940
test ebx, ebx
je 0x1005b973
xor edx, edx
mov eax, 0x7fffffff
div ebx
cmp eax, 4
jl 0x1005c91e
lea eax, [ebx*4]
mov dword [ebp - 8], eax
test eax, eax
js 0x1005c91e
test ecx, ecx
je 0x1005b989
xor edx, edx
mov eax, 0x7fffffff
div ecx
cmp dword [ebp - 8], eax
jg 0x1005c91e
imul ecx, ebx
shl ecx, 2
push ecx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, eax
add esp, 4
mov dword [ebp - 0x24], ebx
test ebx, ebx
je 0x1005c91e
cmp dword [ebp - 0x2c], 0x10
jge 0x1005c18b
mov eax, dword [ebp - 0x18]
xor edi, edi
test eax, eax
je 0x1005c15f
cmp eax, 0x100
jg 0x1005c15f
mov dword [ebp - 8], edi
test eax, eax
jle 0x1005bc16
mov eax, dword [esi + 0xac]
lea ebx, [esi + 0xac]
xor edx, edx
mov ecx, dword [esi + 0xb0]
cmp eax, ecx
jae 0x1005b9f7
mov dl, byte [eax]
lea edi, [eax + 1]
mov byte [ebp - 1], dl
mov eax, edi
jmp 0x1005ba46
cmp dword [esi + 0x20], 0
je 0x1005ba7b
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea edi, [esi + 0x28]
push edi
push dword [esi + 0x1c]
call eax
mov ecx, dword [ebx]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x1005ba31
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [edi], al
jmp 0x1005ba3c
lea ecx, [esi + 0x28]
add ecx, eax
mov dword [esi + 0xb0], ecx
mov al, byte [edi]
mov byte [ebp - 1], al
lea eax, [edi + 1]
mov edi, eax
mov dword [ebx], edi
mov edx, ecx
mov edi, dword [ebp - 8]
shl edi, 2
mov dword [ebp - 0x10], ebx
mov bl, byte [ebp - 1]
mov dword [ebp - 0xc], edi
mov byte [ebp + edi - 0x4a2], bl
lea ebx, [esi + 0xac]
mov dword [ebp - 0x38], edi
cmp eax, ecx
jae 0x1005ba90
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
lea ebx, [esi + 0xac]
jmp 0x1005bae4
shl edx, 2
mov dword [ebp - 0xc], edx
mov byte [ebp + edx - 0x4a2], 0
mov edx, ecx
mov ecx, dword [ebp - 0xc]
jmp 0x1005ba93
mov ecx, dword [ebp - 0x38]
cmp dword [esi + 0x20], 0
je 0x1005bb12
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [ebx]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x1005bace
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x1005bad9
lea ecx, [esi + 0x28]
add ecx, eax
mov dword [esi + 0xb0], ecx
mov al, byte [esi + 0x28]
mov edx, ecx
mov byte [ebp - 1], al
lea eax, [esi + 0x29]
mov dword [ebp - 0x20], ebx
mov ebx, eax
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x10], eax
mov dword [edi], ebx
mov edi, dword [ebp - 0xc]
mov bl, byte [ebp - 1]
mov byte [ebp + edi - 0x4a3], bl
lea ebx, [esi + 0xac]
cmp eax, ecx
jae 0x1005bb1a
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
mov dword [ebx], eax
jmp 0x1005bb77
mov byte [ebp + ecx - 0x4a3], 0
cmp dword [esi + 0x20], 0
je 0x1005bb73
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea edi, [esi + 0x28]
push edi
push dword [esi + 0x1c]
call eax
mov ecx, dword [ebx]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x1005bb5c
lea edx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], edx
mov byte [edi], al
mov byte [ebp - 1], al
lea eax, [edi + 1]
mov dword [ebx], eax
jmp 0x1005bb77
lea edx, [esi + 0x28]
add edx, eax
mov dword [esi + 0xb0], edx
mov al, byte [edi]
mov byte [ebp - 1], al
lea eax, [edi + 1]
mov dword [ebx], eax
jmp 0x1005bb77
mov byte [ebp - 1], 0
cmp dword [ebp - 0x28], 0xc
mov ecx, dword [ebp - 0xc]
mov bl, byte [ebp - 1]
mov byte [ebp + ecx - 0x4a4], bl
lea ebx, [esi + 0xac]
je 0x1005bbf5
cmp eax, edx
jae 0x1005bb99
inc eax
mov dword [ebx], eax
jmp 0x1005bbf5
cmp dword [esi + 0x20], 0
je 0x1005bbf5
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea edi, [esi + 0x28]
push edi
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x1005bbd8
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [edi], 0
jmp 0x1005bbe3
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov ecx, dword [ebp - 0xc]
lea eax, [edi + 1]
mov dword [esi + 0xac], eax
lea ebx, [esi + 0xac]
mov edx, dword [ebp - 8]
inc edx
mov byte [ebp + ecx - 0x4a1], 0xff
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 8], edx
cmp edx, ecx
jl 0x1005b9e1
mov ebx, dword [ebp - 0x24]
xor edi, edi
jmp 0x1005bc19
mov ecx, dword [ebp - 0x18]
xor eax, eax
cmp dword [ebp - 0x28], 0xc
setne al
add eax, 3
imul eax, ecx
mov ecx, dword [ebp - 0x58]
sub ecx, eax
sub ecx, dword [ebp - 0x34]
sub ecx, dword [ebp - 0x28]
je 0x1005bc7b
test ecx, ecx
jns 0x1005bc47
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x1005bc7b
cmp dword [esi + 0x10], 0
je 0x1005bc75
mov edx, dword [esi + 0xb0]
mov eax, edx
sub eax, dword [esi + 0xac]
cmp eax, ecx
jge 0x1005bc75
sub ecx, eax
mov dword [esi + 0xac], edx
mov eax, dword [esi + 0x14]
push ecx
push dword [esi + 0x1c]
call eax
add esp, 8
jmp 0x1005bc7b
add dword [esi + 0xac], ecx
mov edx, dword [ebp - 0x2c]
cmp edx, 1
jne 0x1005bc8d
mov eax, dword [esi]
add eax, 7
shr eax, 3
jmp 0x1005bca4
cmp edx, 4
jne 0x1005bc99
mov eax, dword [esi]
inc eax
shr eax, 1
jmp 0x1005bca4
cmp edx, 8
jne 0x1005c133
mov eax, dword [esi]
mov ecx, dword [esi + 4]
neg eax
and eax, 3
cmp edx, 1
mov dword [ebp - 0x20], eax
mov edx, ecx
jne 0x1005bf00
mov dword [ebp - 0x10], 0
test ecx, ecx
jle 0x1005c83f
nop dword [eax]
mov eax, dword [esi + 0xac]
mov ecx, 7
mov dword [ebp - 0x1c], ecx
cmp eax, dword [esi + 0xb0]
jae 0x1005bcf1
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1005bd5e
cmp dword [esi + 0x20], 0
je 0x1005bd5c
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x1005bd40
mov ecx, dword [ebp - 0x1c]
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov byte [esi + 0x28], 0
mov dl, byte [esi + 0x28]
mov dword [esi + 0xac], eax
jmp 0x1005bd5e
mov ecx, dword [ebp - 0x1c]
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov dl, byte [esi + 0x28]
mov dword [esi + 0xac], eax
jmp 0x1005bd5e
xor dl, dl
movzx eax, dl
mov edx, dword [esi]
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], 0
test edx, edx
jle 0x1005beac
mov eax, edx
mov dword [ebp - 0x14], eax
nop word [eax + eax]
mov eax, dword [ebp - 0x28]
sar eax, cl
and eax, 1
lea ecx, [eax*4]
movzx eax, byte [ebp + ecx - 0x4a4]
mov byte [edi + ebx], al
movzx eax, byte [ebp + ecx - 0x4a3]
mov byte [edi + ebx + 1], al
movzx eax, byte [ebp + ecx - 0x4a2]
mov byte [edi + ebx + 2], al
mov eax, dword [ebp - 8]
inc eax
mov byte [edi + ebx + 3], 0xff
add edi, 4
mov dword [ebp - 8], eax
cmp eax, edx
je 0x1005beac
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
mov dword [ebp - 0x1c], ecx
jns 0x1005be9e
mov eax, dword [esi + 0xac]
mov dword [ebp - 0x1c], 7
cmp eax, dword [esi + 0xb0]
jae 0x1005be0a
mov cl, byte [eax]
inc eax
mov edx, dword [ebp - 0x14]
mov dword [esi + 0xac], eax
movzx eax, cl
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 8]
jmp 0x1005bea1
cmp dword [esi + 0x20], 0
je 0x1005be8b
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x1005be64
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov byte [esi + 0x28], 0
mov cl, byte [esi + 0x28]
mov dword [esi + 0xac], eax
mov edx, dword [esi]
movzx eax, cl
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 8]
jmp 0x1005bea1
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov cl, byte [esi + 0x28]
mov dword [esi + 0xac], eax
mov edx, dword [esi]
movzx eax, cl
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 8]
jmp 0x1005bea1
mov edx, dword [ebp - 0x14]
xor cl, cl
movzx eax, cl
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 8]
jmp 0x1005bea1
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x14], edx
cmp eax, edx
jl 0x1005bd80
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x1005bee7
cmp dword [esi + 0x10], 0
je 0x1005bee1
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x1005bee1
sub eax, ecx
mov dword [esi + 0xac], edx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
add esp, 8
jmp 0x1005bee7
add dword [esi + 0xac], eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [esi + 4]
inc eax
mov dword [ebp - 0x10], eax
mov edx, ecx
cmp eax, ecx
jl 0x1005bcd0
jmp 0x1005c83f
mov dword [ebp - 0x30], 0
test ecx, ecx
jle 0x1005c83f
nop
cmp dword [esi], 0
mov dword [ebp - 0x10], 0
jle 0x1005c0e2
mov ecx, dword [esi + 0xac]
mov edx, dword [esi + 0xb0]
cmp ecx, edx
jae 0x1005bf3b
mov al, byte [ecx]
inc ecx
mov dword [esi + 0xac], ecx
jmp 0x1005bf9e
cmp dword [esi + 0x20], 0
je 0x1005bf9c
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x1005bf83
lea edx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], edx
lea ecx, [esi + 0x29]
mov byte [esi + 0x28], al
mov dword [esi + 0xac], ecx
jmp 0x1005bf9e
lea edx, [esi + 0x28]
add edx, eax
lea ecx, [esi + 0x29]
mov dword [esi + 0xb0], edx
mov al, byte [esi + 0x28]
mov dword [esi + 0xac], ecx
jmp 0x1005bf9e
xor al, al
cmp dword [ebp - 0x2c], 4
movzx eax, al
mov dword [ebp - 8], eax
mov dword [ebp - 0x14], 0
jne 0x1005bfbe
mov dword [ebp - 0x14], eax
and dword [ebp - 0x14], 0xf
shr eax, 4
mov dword [ebp - 8], eax
movzx eax, byte [ebp + eax*4 - 0x4a4]
mov byte [edi + ebx], al
mov eax, dword [ebp - 8]
movzx eax, byte [ebp + eax*4 - 0x4a3]
mov byte [edi + ebx + 1], al
mov eax, dword [ebp - 8]
movzx eax, byte [ebp + eax*4 - 0x4a2]
mov byte [edi + ebx + 2], al
mov eax, dword [esi]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x10]
mov byte [edi + ebx + 3], 0xff
inc eax
add edi, 4
cmp eax, dword [esi]
je 0x1005c0df
cmp dword [ebp - 0x2c], 8
jne 0x1005c09d
cmp ecx, edx
jae 0x1005c024
mov dl, byte [ecx]
lea eax, [ecx + 1]
mov ecx, dword [ebp - 8]
mov dword [esi + 0xac], eax
movzx edx, dl
jmp 0x1005c0a3
cmp dword [esi + 0x20], 0
je 0x1005c093
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x1005c075
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov byte [esi + 0x28], 0
mov dl, byte [esi + 0x28]
mov dword [esi + 0xac], eax
mov ecx, dword [esi]
movzx edx, dl
jmp 0x1005c0a3
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov dl, byte [esi + 0x28]
mov dword [esi + 0xac], eax
mov ecx, dword [esi]
movzx edx, dl
jmp 0x1005c0a3
mov ecx, dword [ebp - 8]
xor dl, dl
movzx edx, dl
jmp 0x1005c0a3
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
movzx eax, byte [ebp + edx*4 - 0x4a4]
mov byte [edi + ebx], al
movzx eax, byte [ebp + edx*4 - 0x4a3]
mov byte [edi + ebx + 1], al
movzx eax, byte [ebp + edx*4 - 0x4a2]
mov byte [edi + ebx + 2], al
mov eax, dword [ebp - 0x10]
add eax, 2
mov byte [edi + ebx + 3], 0xff
add edi, 4
mov dword [ebp - 0x10], eax
cmp eax, ecx
jl 0x1005bf20
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x1005c11d
cmp dword [esi + 0x10], 0
je 0x1005c117
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x1005c117
sub eax, ecx
mov dword [esi + 0xac], edx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
mov eax, dword [ebp - 0x20]
add esp, 8
jmp 0x1005c11d
add dword [esi + 0xac], eax
inc dword [ebp - 0x30]
mov ecx, dword [esi + 4]
mov edx, ecx
cmp dword [ebp - 0x30], ecx
jl 0x1005bf10
jmp 0x1005c83f
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [0x10265504]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0xc], str.bad_bpp
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [0x10265504]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0xc], str.invalid
xor eax, eax
mov esp, ebp
pop ebp
ret
sub edi, dword [ebp - 0x34]
xor eax, eax
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x48], eax
sub edi, dword [ebp - 0x28]
je 0x1005c218
test edi, edi
jns 0x1005c1e5
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x1005c218
cmp dword [esi + 0x10], eax
je 0x1005c212
mov ecx, dword [esi + 0xb0]
mov eax, ecx
sub eax, dword [esi + 0xac]
cmp eax, edi
jge 0x1005c212
sub edi, eax
mov dword [esi + 0xac], ecx
mov eax, dword [esi + 0x14]
push edi
push dword [esi + 0x1c]
call eax
add esp, 8
jmp 0x1005c218
add dword [esi + 0xac], edi
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0x18
jne 0x1005c227
mov eax, dword [esi]
lea edi, [eax + eax*2]
jmp 0x1005c234
cmp ecx, 0x10
jne 0x1005c232
mov edi, dword [esi]
add edi, edi
jmp 0x1005c234
xor edi, edi
neg edi
and edi, 3
mov dword [ebp - 0x28], edi
cmp ecx, 0x18
jne 0x1005c24f
mov dword [ebp - 0x48], 1
xor eax, eax
jmp 0x1005c41b
mov edx, dword [ebp - 0x14]
cmp ecx, 0x20
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
jne 0x1005c28b
cmp edx, 0xff
jne 0x1005c28b
cmp eax, 0xff00
jne 0x1005c28b
cmp ecx, 0xff0000
jne 0x1005c28b
cmp dword [ebp - 0x1c], 0xff000000
jne 0x1005c2a3
mov dword [ebp - 0x48], 2
xor eax, eax
jmp 0x1005c41b
test ecx, ecx
je 0x1005c8f2
test eax, eax
je 0x1005c8f2
test edx, edx
je 0x1005c8f2
call fcn.1005b160
sub eax, 7
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x3c]
mov edx, eax
and eax, 0x55555555
shr edx, 1
and edx, 0x55555555
add edx, eax
mov eax, edx
and edx, 0x33333333
shr eax, 2
and eax, 0x33333333
add eax, edx
mov ecx, eax
shr ecx, 4
add ecx, eax
and ecx, 0xf0f0f0f
mov eax, ecx
shr eax, 8
add ecx, eax
mov eax, ecx
shr eax, 0x10
add eax, ecx
mov ecx, dword [ebp - 0x40]
movzx eax, al
mov dword [ebp - 0x50], eax
call fcn.1005b160
sub eax, 7
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x40]
mov edx, eax
and eax, 0x55555555
shr edx, 1
and edx, 0x55555555
add edx, eax
mov eax, edx
and edx, 0x33333333
shr eax, 2
and eax, 0x33333333
add eax, edx
mov ecx, eax
shr ecx, 4
add ecx, eax
and ecx, 0xf0f0f0f
mov eax, ecx
shr eax, 8
add ecx, eax
mov eax, ecx
shr eax, 0x10
add eax, ecx
mov ecx, dword [ebp - 0x14]
movzx eax, al
mov dword [ebp - 0x30], eax
call fcn.1005b160
sub eax, 7
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
mov edx, eax
and eax, 0x55555555
shr edx, 1
and edx, 0x55555555
add edx, eax
mov eax, edx
and edx, 0x33333333
shr eax, 2
and eax, 0x33333333
add eax, edx
mov ecx, eax
shr ecx, 4
add ecx, eax
and ecx, 0xf0f0f0f
mov eax, ecx
shr eax, 8
add ecx, eax
mov eax, ecx
shr eax, 0x10
add eax, ecx
mov ecx, dword [ebp - 0x1c]
movzx eax, al
mov dword [ebp - 0x10], eax
call fcn.1005b160
sub eax, 7
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x1c]
mov edx, eax
and eax, 0x55555555
shr edx, 1
and edx, 0x55555555
add edx, eax
mov eax, edx
and edx, 0x33333333
shr eax, 2
and eax, 0x33333333
add eax, edx
mov ecx, eax
shr ecx, 4
add ecx, eax
and ecx, 0xf0f0f0f
mov eax, ecx
shr eax, 8
add ecx, eax
mov eax, ecx
shr eax, 0x10
add eax, ecx
cmp dword [ebp - 0x50], 8
movzx eax, al
mov dword [ebp - 0x58], eax
ja 0x1005c8f2
cmp dword [ebp - 0x30], 8
ja 0x1005c8f2
cmp dword [ebp - 0x10], 8
ja 0x1005c8f2
cmp eax, 8
ja 0x1005c8f2
mov ecx, dword [esi + 4]
mov edx, ecx
mov dword [ebp - 0x38], 0
test ecx, ecx
jle 0x1005c83f
mov ecx, dword [ebp - 0x4c]
neg ecx
mov dword [ebp - 0x60], ecx
mov ecx, 8
sub ecx, dword [ebp - 0x50]
mov dword [ebp - 0x64], ecx
mov ecx, dword [ebp - 0x54]
neg ecx
mov dword [ebp - 0x68], ecx
mov ecx, 8
sub ecx, dword [ebp - 0x30]
mov dword [ebp - 0x6c], ecx
mov ecx, dword [ebp - 0x20]
neg ecx
mov dword [ebp - 0x70], ecx
mov ecx, 8
sub ecx, dword [ebp - 0x10]
mov dword [ebp - 0x74], ecx
mov ecx, dword [ebp - 8]
neg ecx
mov dword [ebp - 0x78], ecx
mov ecx, 8
sub ecx, eax
mov dword [ebp - 0x7c], ecx
nop word [eax + eax]
cmp dword [ebp - 0x48], 0
mov eax, dword [esi]
mov dword [ebp - 0x34], 0
je 0x1005c6b2
test eax, eax
jle 0x1005c7f1
mov edx, dword [ebp - 0xc]
lea edi, [esi + 0xac]
mov ecx, dword [esi + 0xb0]
mov eax, dword [edi]
mov dword [ebp - 0x18], ecx
cmp eax, ecx
jae 0x1005c4bb
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
jmp 0x1005c510
cmp dword [esi + 0x20], 0
je 0x1005c52f
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [edi]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x1005c4f6
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x1005c501
lea ecx, [esi + 0x28]
add ecx, eax
mov dword [esi + 0xb0], ecx
mov al, byte [esi + 0x28]
mov edx, dword [ebp - 0xc]
mov byte [ebp - 1], al
lea eax, [esi + 0x29]
mov dword [ebp - 0x18], ecx
mov ebx, edi
mov ecx, eax
mov dword [ebx], ecx
mov ebx, dword [ebp - 0x24]
mov cl, byte [ebp - 1]
mov byte [edx + ebx + 2], cl
mov ecx, dword [ebp - 0x18]
cmp eax, ecx
jae 0x1005c534
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
jmp 0x1005c589
mov byte [edx + ebx + 2], 0
cmp dword [esi + 0x20], 0
je 0x1005c5a7
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [edi]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x1005c56f
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x1005c57a
lea ecx, [esi + 0x28]
add ecx, eax
mov dword [esi + 0xb0], ecx
mov al, byte [esi + 0x28]
mov edx, dword [ebp - 0xc]
mov byte [ebp - 1], al
lea eax, [esi + 0x29]
mov dword [ebp - 0x18], ecx
mov ebx, edi
mov ecx, eax
mov dword [ebx], ecx
mov ebx, dword [ebp - 0x24]
mov cl, byte [ebp - 1]
mov byte [edx + ebx + 1], cl
mov ecx, dword [ebp - 0x18]
cmp eax, ecx
jae 0x1005c5ac
mov cl, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x1005c60d
mov byte [edx + ebx + 1], 0
cmp dword [esi + 0x20], 0
je 0x1005c60b
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [edi]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x1005c5f3
mov edx, dword [ebp - 0xc]
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov byte [esi + 0x28], 0
mov cl, byte [esi + 0x28]
mov dword [edi], eax
jmp 0x1005c60d
mov edx, dword [ebp - 0xc]
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov cl, byte [esi + 0x28]
mov dword [edi], eax
jmp 0x1005c60d
xor cl, cl
mov byte [edx + ebx], cl
add edx, 3
cmp dword [ebp - 0x48], 2
mov dword [ebp - 0xc], edx
jne 0x1005c68e
cmp eax, dword [esi + 0xb0]
jae 0x1005c62b
mov cl, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x1005c691
cmp dword [esi + 0x20], 0
je 0x1005c68a
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [edi]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x1005c672
mov edx, dword [ebp - 0xc]
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov byte [esi + 0x28], 0
mov cl, byte [esi + 0x28]
mov dword [edi], eax
jmp 0x1005c691
mov edx, dword [ebp - 0xc]
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov cl, byte [esi + 0x28]
mov dword [edi], eax
jmp 0x1005c691
xor cl, cl
jmp 0x1005c691
or cl, 0xff
movzx eax, cl
or dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x34]
inc eax
mov byte [edx + ebx], cl
inc edx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0xc], edx
cmp eax, dword [esi]
jl 0x1005c4a4
jmp 0x1005c7ee
test eax, eax
jle 0x1005c7f1
mov edi, dword [ebp - 0x24]
nop dword [eax]
mov ecx, esi
call fcn.100522b0
cmp dword [ebp - 0x2c], 0x10
jne 0x1005c6d1
mov ebx, eax
jmp 0x1005c6e4
mov ecx, esi
mov edi, eax
call fcn.100522b0
mov ebx, eax
shl ebx, 0x10
add ebx, edi
mov edi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x4c]
mov edx, ebx
and edx, dword [ebp - 0x3c]
mov eax, edx
shr eax, cl
mov ecx, dword [ebp - 0x60]
shl edx, cl
cmp dword [ebp - 0x4c], 0
mov ecx, dword [ebp - 0x64]
cmovge edx, eax
mov eax, dword [ebp - 0x50]
shr edx, cl
imul edx, dword [eax*4 + 0x1025b67c]
mov ecx, dword [eax*4 + 0x1025b6d0]
mov eax, dword [ebp - 0xc]
sar edx, cl
mov byte [eax + edi], dl
inc eax
mov ecx, dword [ebp - 0x54]
mov edx, ebx
and edx, dword [ebp - 0x40]
mov dword [ebp - 0xc], eax
mov eax, edx
shr eax, cl
mov ecx, dword [ebp - 0x68]
shl edx, cl
cmp dword [ebp - 0x54], 0
mov ecx, dword [ebp - 0x6c]
cmovge edx, eax
mov eax, dword [ebp - 0x30]
shr edx, cl
imul edx, dword [eax*4 + 0x1025b67c]
mov ecx, dword [eax*4 + 0x1025b6d0]
mov eax, dword [ebp - 0xc]
sar edx, cl
mov ecx, dword [ebp - 0x20]
mov byte [eax + edi], dl
inc eax
mov dword [ebp - 0xc], eax
mov edx, ebx
and edx, dword [ebp - 0x14]
mov eax, edx
shr eax, cl
mov ecx, dword [ebp - 0x70]
shl edx, cl
cmp dword [ebp - 0x20], 0
mov ecx, dword [ebp - 0x74]
cmovge edx, eax
mov eax, dword [ebp - 0x10]
shr edx, cl
imul edx, dword [eax*4 + 0x1025b67c]
mov ecx, dword [eax*4 + 0x1025b6d0]
mov eax, dword [ebp - 0xc]
sar edx, cl
mov byte [eax + edi], dl
mov edx, eax
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x1005c7ca
mov ecx, dword [ebp - 8]
and ebx, eax
mov eax, ebx
shr eax, cl
mov ecx, dword [ebp - 0x78]
shl ebx, cl
cmp dword [ebp - 8], 0
mov ecx, dword [ebp - 0x7c]
cmovge ebx, eax
mov eax, dword [ebp - 0x58]
shr ebx, cl
imul ebx, dword [eax*4 + 0x1025b67c]
mov ecx, dword [eax*4 + 0x1025b6d0]
sar ebx, cl
jmp 0x1005c7cf
mov ebx, 0xff
mov eax, dword [ebp - 0x34]
or dword [ebp - 0x44], ebx
inc eax
mov byte [edx + edi + 1], bl
add edx, 2
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x34], eax
cmp eax, dword [esi]
jl 0x1005c6c0
mov ebx, dword [ebp - 0x24]
mov edi, dword [ebp - 0x28]
test edi, edi
je 0x1005c82b
cmp dword [esi + 0x10], 0
je 0x1005c825
mov eax, dword [esi + 0xb0]
mov ecx, eax
sub ecx, dword [esi + 0xac]
cmp ecx, edi
jge 0x1005c825
mov dword [esi + 0xac], eax
mov eax, edi
sub eax, ecx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
add esp, 8
jmp 0x1005c82b
add dword [esi + 0xac], edi
mov eax, dword [ebp - 0x38]
mov ecx, dword [esi + 4]
inc eax
mov dword [ebp - 0x38], eax
mov edx, ecx
cmp eax, ecx
jl 0x1005c480
cmp dword [ebp - 0x44], 0
jne 0x1005c861
mov eax, dword [esi]
imul eax, ecx
lea eax, [eax*4 - 1]
test eax, eax
js 0x1005c861
mov byte [eax + ebx], 0xff
sub eax, 4
jns 0x1005c855
mov edx, dword [esi + 4]
cmp dword [ebp - 0x5c], 0
jle 0x1005c8d1
xor edi, edi
mov ecx, edx
mov dword [ebp - 0x38], edi
test ecx, 0xfffffffe
jle 0x1005c8d1
mov eax, dword [esi]
sub ecx, edi
dec ecx
mov edx, eax
imul ecx, eax
imul edx, edi
xor edi, edi
shl eax, 2
shl ecx, 2
shl edx, 2
mov dword [ebp - 0x5c], edx
lea edx, [ecx + ebx]
test eax, eax
jle 0x1005c8bd
mov ebx, dword [ebp - 0x5c]
sub ebx, ecx
nop dword [eax]
mov al, byte [edx]
lea edx, [edx + 1]
mov cl, byte [edx + ebx - 1]
inc edi
mov byte [edx + ebx - 1], al
mov byte [edx - 1], cl
mov eax, dword [esi]
shl eax, 2
cmp edi, eax
jl 0x1005c8a0
mov ebx, dword [ebp - 0x24]
mov edx, dword [esi + 4]
mov ecx, edx
mov edi, dword [ebp - 0x38]
mov eax, ecx
inc edi
sar eax, 1
mov dword [ebp - 0x38], edi
cmp edi, eax
jl 0x1005c876
mov ecx, dword [ebp - 0x80]
mov eax, dword [esi]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [eax], edx
test ecx, ecx
je 0x1005c8e9
mov eax, dword [esi + 8]
mov dword [ecx], eax
pop edi
mov eax, ebx
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [0x10265504]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0xc], str.bad_masks
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x10265504]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], str.outofmem
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x10265504]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], str.too_large
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x10265504]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], str.bad_offset
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x10265504]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], str.bad_header
xor eax, eax
mov esp, ebp
pop ebp
ret