Function at 0x40d2c0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4b4
push ebx
push esi
mov dword [ebp - 0x8c], edx
mov esi, ecx
push edi
lea edx, [ebp - 0xac]
mov dword [ebp - 8], 0
mov dword [ebp - 0x90], 0xff
call fcn.0040ce30
test eax, eax
je 0x40d3c0
mov eax, dword [esi + 4]
mov ebx, dword [ebp - 0xa8]
mov dword [ebp - 0x60], eax
cdq
mov edi, eax
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xa0]
xor edi, edx
mov dword [ebp - 0x3c], eax
sub edi, edx
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x18], edi
mov dword [esi + 4], edi
mov dword [ebp - 0x2c], eax
cmp eax, 0xc
jne 0x40d370
mov edx, dword [ebp - 0xac]
mov dword [ebp - 0x38], edx
cmp edx, 0x18
jge 0x40d38e
lea ecx, [ebx - 0x26]
mov eax, 0x55555556
imul ecx
mov edi, edx
shr edi, 0x1f
add edi, edx
jmp 0x40d388
mov ecx, dword [ebp - 0xac]
mov dword [ebp - 0x38], ecx
cmp ecx, 0x10
jge 0x40d38e
mov edi, ebx
sub edi, eax
sub edi, 0xe
sar edi, 2
mov dword [ebp - 8], edi
mov edi, dword [ebp - 0x18]
mov ecx, dword [esi]
xor eax, eax
cmp dword [ebp - 0x24], eax
setne al
add eax, 3
mov dword [ebp - 0x30], eax
mov dword [esi + 8], eax
test ecx, ecx
js 0x40d3b6
je 0x40d3c9
mov eax, 0x7fffffff
cdq
idiv ecx
mov edx, dword [ebp - 0x30]
cmp edx, eax
jle 0x40d3cc
mov dword [0x4983b8], str.too_large
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x30]
mov eax, ecx
imul eax, edx
mov dword [ebp - 0x18], eax
test eax, eax
js 0x40d3b6
test edi, edi
js 0x40d3b6
je 0x40d3eb
mov eax, 0x7fffffff
cdq
idiv edi
cmp dword [ebp - 0x18], eax
jg 0x40d3b6
test ecx, ecx
je 0x40d3fc
mov eax, 0x7fffffff
cdq
idiv ecx
cmp dword [ebp - 0x30], eax
jg 0x40d427
test edi, edi
je 0x40d40d
mov eax, 0x7fffffff
cdq
idiv edi
cmp dword [ebp - 0x18], eax
jg 0x40d427
imul ecx, edi
imul ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
mov dword [ebp - 0x28], edi
test edi, edi
jne 0x40d43a
mov dword [0x4983b8], str.outofmem
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x38], 0x10
jge 0x40dafb
mov eax, dword [ebp - 8]
xor edi, edi
test eax, eax
je 0x40dadc
cmp eax, 0x100
jg 0x40dadc
mov dword [ebp - 0x10], edi
test eax, eax
jle 0x40d659
mov eax, dword [esi + 0xa8]
mov edi, dword [ebp - 8]
mov ecx, dword [esi + 0xac]
cmp eax, ecx
jae 0x40d485
mov dl, byte [eax]
inc eax
mov dword [esi + 0xa8], eax
jmp 0x40d4eb
cmp dword [esi + 0x20], 0
je 0x40d4e9
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ebx, [esi + 0x28]
push ebx
push dword [esi + 0x1c]
call eax
add esp, 0xc
mov dword [esi + 0xa8], ebx
test eax, eax
jne 0x40d4cf
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xac], eax
mov eax, ebx
mov byte [eax], 0
mov eax, dword [esi + 0xa8]
mov ecx, dword [esi + 0xac]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xa8], eax
jmp 0x40d4eb
lea ecx, [ebx + eax]
mov eax, dword [esi + 0xa8]
mov dword [esi + 0xac], ecx
mov dl, byte [eax]
inc eax
mov dword [esi + 0xa8], eax
jmp 0x40d4eb
xor dl, dl
mov ebx, dword [ebp - 0x10]
mov byte [ebp + ebx*4 - 0x4ae], dl
cmp eax, ecx
jae 0x40d504
mov dl, byte [eax]
inc eax
mov dword [esi + 0xa8], eax
jmp 0x40d55e
cmp dword [esi + 0x20], 0
je 0x40d55c
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ebx, [esi + 0x28]
push ebx
push dword [esi + 0x1c]
call eax
add esp, 0xc
mov dword [esi + 0xa8], ebx
test eax, eax
jne 0x40d53f
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xac], eax
mov eax, ebx
mov byte [eax], 0
mov ecx, dword [esi + 0xac]
jmp 0x40d548
lea ecx, [ebx + eax]
mov dword [esi + 0xac], ecx
mov eax, dword [esi + 0xa8]
mov ebx, dword [ebp - 0x10]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xa8], eax
jmp 0x40d55e
xor dl, dl
mov byte [ebp + ebx*4 - 0x4af], dl
cmp eax, ecx
jae 0x40d574
mov cl, byte [eax]
inc eax
mov dword [esi + 0xa8], eax
jmp 0x40d5d3
cmp dword [esi + 0x20], 0
je 0x40d5d1
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ebx, [esi + 0x28]
push ebx
push dword [esi + 0x1c]
call eax
add esp, 0xc
mov dword [esi + 0xa8], ebx
test eax, eax
jne 0x40d5b8
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xac], eax
mov eax, ebx
mov byte [eax], 0
mov eax, dword [esi + 0xa8]
mov cl, byte [eax]
inc eax
mov dword [esi + 0xa8], eax
jmp 0x40d5d3
add eax, ebx
mov dword [esi + 0xac], eax
mov eax, dword [esi + 0xa8]
mov cl, byte [eax]
inc eax
mov dword [esi + 0xa8], eax
jmp 0x40d5d3
xor cl, cl
cmp dword [ebp - 0x2c], 0xc
mov edx, dword [ebp - 0x10]
mov byte [ebp + edx*4 - 0x4b0], cl
je 0x40d640
cmp eax, dword [esi + 0xac]
jae 0x40d5f4
inc eax
mov dword [esi + 0xa8], eax
jmp 0x40d640
cmp dword [esi + 0x20], 0
je 0x40d640
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ebx, [esi + 0x28]
push ebx
push dword [esi + 0x1c]
call eax
add esp, 0xc
mov dword [esi + 0xa8], ebx
test eax, eax
jne 0x40d629
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xac], eax
mov eax, ebx
mov byte [eax], 0
jmp 0x40d631
add eax, ebx
mov dword [esi + 0xac], eax
inc dword [esi + 0xa8]
mov eax, dword [esi + 0xa8]
mov edx, dword [ebp - 0x10]
mov byte [ebp + edx*4 - 0x4ad], 0xff
inc edx
mov dword [ebp - 0x10], edx
cmp edx, edi
jl 0x40d470
mov ebx, dword [ebp - 0xc]
xor edi, edi
xor eax, eax
cmp dword [ebp - 0x2c], 0xc
setne al
add eax, 3
imul eax, dword [ebp - 8]
sub ebx, eax
sub ebx, dword [ebp - 0x2c]
sub ebx, 0xe
mov dword [ebp - 0xc], ebx
lea ebx, [esi + 0xa8]
jns 0x40d686
mov eax, dword [esi + 0xac]
mov dword [ebx], eax
jmp 0x40d6b1
cmp dword [esi + 0x10], 0
mov eax, dword [ebp - 0xc]
je 0x40d6af
mov edx, dword [esi + 0xac]
mov ecx, edx
sub ecx, dword [ebx]
cmp ecx, eax
jge 0x40d6af
sub eax, ecx
mov dword [ebx], edx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
add esp, 8
jmp 0x40d6b1
add dword [ebx], eax
mov ecx, dword [ebp - 0x38]
cmp ecx, 1
jne 0x40d6c3
mov eax, dword [esi]
add eax, 7
shr eax, 3
jmp 0x40d6da
cmp ecx, 4
jne 0x40d6cf
mov eax, dword [esi]
inc eax
shr eax, 1
jmp 0x40d6da
cmp ecx, 8
jne 0x40dabd
mov eax, dword [esi]
mov edx, dword [esi + 4]
neg eax
and eax, 3
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], eax
cmp ecx, 1
jne 0x40d8ba
mov dword [ebp - 0x40], 0
test edx, edx
jle 0x40dab2
mov eax, dword [ebx]
mov ecx, 7
mov dword [ebp - 0x10], ecx
cmp eax, dword [esi + 0xac]
jae 0x40d719
mov dl, byte [eax]
inc eax
mov dword [ebx], eax
jmp 0x40d76d
cmp dword [esi + 0x20], 0
je 0x40d76b
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
add esp, 0xc
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x40d757
mov ecx, dword [ebp - 0x10]
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xac], eax
mov eax, dword [ebx]
mov byte [eax], 0
mov eax, dword [ebx]
mov dl, byte [eax]
inc eax
mov dword [ebx], eax
jmp 0x40d76d
add eax, ecx
mov ecx, dword [ebp - 0x10]
mov dword [esi + 0xac], eax
mov eax, dword [ebx]
mov dl, byte [eax]
inc eax
mov dword [ebx], eax
jmp 0x40d76d
xor dl, dl
movzx eax, dl
mov dword [ebp - 0x18], eax
mov eax, dword [esi]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], eax
test eax, eax
jle 0x40d870
mov edx, dword [ebp - 0x28]
nop word [eax + eax]
mov eax, dword [ebp - 0x18]
sar eax, cl
and eax, 1
lea ecx, [eax*4]
movzx eax, byte [ebp + ecx - 0x4b0]
mov byte [edi + edx], al
movzx eax, byte [ebp + ecx - 0x4af]
mov byte [edi + edx + 1], al
movzx eax, byte [ebp + ecx - 0x4ae]
mov byte [edi + edx + 2], al
add edi, 3
cmp dword [ebp - 0x24], 0
je 0x40d7d0
mov byte [edi + edx], 0xff
inc edi
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
inc ecx
mov dword [ebp - 0x1c], ecx
cmp ecx, eax
je 0x40d870
sub dword [ebp - 0x10], 1
mov dword [ebp - 0x20], eax
jns 0x40d865
mov eax, dword [ebx]
mov dword [ebp - 0x10], 7
cmp eax, dword [esi + 0xac]
jae 0x40d803
mov cl, byte [eax]
inc eax
mov dword [ebx], eax
jmp 0x40d857
cmp dword [esi + 0x20], 0
je 0x40d855
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
add esp, 0xc
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x40d841
mov edx, dword [ebp - 0x28]
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xac], eax
mov eax, dword [ebx]
mov byte [eax], 0
mov eax, dword [ebx]
mov cl, byte [eax]
inc eax
mov dword [ebx], eax
jmp 0x40d857
mov edx, dword [ebp - 0x28]
add eax, ecx
mov dword [esi + 0xac], eax
mov eax, dword [ebx]
mov cl, byte [eax]
inc eax
mov dword [ebx], eax
jmp 0x40d857
xor cl, cl
movzx eax, cl
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
mov eax, dword [esi]
mov dword [ebp - 0x20], eax
cmp ecx, eax
mov ecx, dword [ebp - 0x10]
jl 0x40d790
cmp dword [esi + 0x10], 0
mov edx, dword [ebp - 0xc]
je 0x40d899
mov eax, dword [esi + 0xac]
mov ecx, eax
sub ecx, dword [ebx]
cmp ecx, edx
jge 0x40d899
sub edx, ecx
mov dword [ebx], eax
mov eax, dword [esi + 0x14]
push edx
push dword [esi + 0x1c]
call eax
add esp, 8
jmp 0x40d89b
add dword [ebx], edx
mov eax, dword [ebp - 0x40]
mov edx, dword [esi + 4]
inc eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 8], edx
cmp eax, edx
jl 0x40d700
mov edi, dword [ebp - 0x28]
mov eax, edx
jmp 0x40e2b2
xor ecx, ecx
mov dword [ebp - 0x34], ecx
test edx, edx
jle 0x40dab2
nop word [eax + eax]
cmp dword [esi], 0
mov dword [ebp - 0x1c], 0
jle 0x40da6f
mov ecx, dword [ebx]
cmp ecx, dword [esi + 0xac]
jae 0x40d8f1
mov dl, byte [ecx]
inc ecx
mov dword [ebx], ecx
jmp 0x40d943
cmp dword [esi + 0x20], 0
je 0x40d941
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
add esp, 0xc
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x40d92e
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xac], eax
mov eax, dword [ebx]
mov byte [eax], 0
mov eax, dword [ebx]
mov dl, byte [eax]
lea ecx, [eax + 1]
mov dword [ebx], ecx
jmp 0x40d943
add eax, ecx
mov dword [esi + 0xac], eax
mov eax, dword [ebx]
mov dl, byte [eax]
lea ecx, [eax + 1]
mov dword [ebx], ecx
jmp 0x40d943
xor dl, dl
movzx eax, dl
xor edx, edx
cmp dword [ebp - 0x38], 4
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], edx
jne 0x40d962
mov edx, eax
and edx, 0xf
shr eax, 4
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x28]
movzx eax, byte [ebp + eax*4 - 0x4b0]
mov byte [edi + edx], al
mov eax, dword [ebp - 0x20]
movzx eax, byte [ebp + eax*4 - 0x4af]
mov byte [edi + edx + 1], al
mov eax, dword [ebp - 0x20]
movzx eax, byte [ebp + eax*4 - 0x4ae]
mov byte [edi + edx + 2], al
add edi, 3
cmp dword [ebp - 0x24], 0
je 0x40d99c
mov byte [edi + edx], 0xff
inc edi
mov eax, dword [ebp - 0x1c]
inc eax
cmp eax, dword [esi]
je 0x40da6c
cmp dword [ebp - 0x38], 8
jne 0x40da27
cmp ecx, dword [esi + 0xac]
jae 0x40d9c8
mov al, byte [ecx]
mov byte [ebp - 1], al
lea eax, [ecx + 1]
mov cl, byte [ebp - 1]
mov dword [ebx], eax
movzx ecx, cl
jmp 0x40da2a
cmp dword [esi + 0x20], 0
je 0x40da20
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
add esp, 0xc
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x40da09
mov edx, dword [ebp - 0x28]
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xac], eax
mov eax, dword [ebx]
mov byte [eax], 0
mov eax, dword [ebx]
mov cl, byte [eax]
inc eax
mov dword [ebx], eax
movzx ecx, cl
jmp 0x40da2a
mov edx, dword [ebp - 0x28]
add eax, ecx
mov dword [esi + 0xac], eax
mov eax, dword [ebx]
mov cl, byte [eax]
inc eax
mov dword [ebx], eax
movzx ecx, cl
jmp 0x40da2a
xor cl, cl
movzx ecx, cl
jmp 0x40da2a
mov ecx, dword [ebp - 0x18]
movzx eax, byte [ebp + ecx*4 - 0x4b0]
mov byte [edi + edx], al
movzx eax, byte [ebp + ecx*4 - 0x4af]
mov byte [edi + edx + 1], al
movzx eax, byte [ebp + ecx*4 - 0x4ae]
mov byte [edi + edx + 2], al
add edi, 3
cmp dword [ebp - 0x24], 0
je 0x40da5b
mov byte [edi + edx], 0xff
inc edi
mov eax, dword [ebp - 0x1c]
add eax, 2
mov dword [ebp - 0x1c], eax
cmp eax, dword [esi]
jl 0x40d8e0
mov eax, dword [ebp - 0xc]
cmp dword [esi + 0x10], 0
je 0x40da9e
mov eax, dword [esi + 0xac]
mov ecx, eax
sub ecx, dword [ebx]
mov edx, dword [ebp - 0xc]
cmp ecx, edx
jge 0x40da9b
sub edx, ecx
mov dword [ebx], eax
mov eax, dword [esi + 0x14]
push edx
push dword [esi + 0x1c]
call eax
mov eax, dword [ebp - 0xc]
add esp, 8
jmp 0x40daa0
mov eax, dword [ebp - 0xc]
add dword [ebx], eax
inc dword [ebp - 0x34]
mov edx, dword [esi + 4]
mov dword [ebp - 8], edx
cmp dword [ebp - 0x34], edx
jl 0x40d8d0
mov edi, dword [ebp - 0x28]
mov eax, dword [ebp - 8]
jmp 0x40e2b2
push dword [ebp - 0x28]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov dword [0x4983b8], 0x488124
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x28]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov dword [0x4983b8], 0x48811c
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
sub ebx, dword [ebp - 0x2c]
sub ebx, 0xe
mov dword [ebp - 0x54], 0
mov dword [ebp - 0xc], ebx
lea ebx, [esi + 0xa8]
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x2c], ebx
jns 0x40db5f
mov eax, dword [esi + 0xac]
mov dword [ebx], eax
jmp 0x40db90
cmp dword [esi + 0x10], 0
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x2c], ebx
je 0x40db8b
mov edx, dword [esi + 0xac]
mov ecx, edx
sub ecx, dword [ebx]
cmp ecx, eax
jge 0x40db8b
sub eax, ecx
mov dword [ebx], edx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
add esp, 8
jmp 0x40db90
add dword [ebx], eax
mov dword [ebp - 0x2c], ebx
mov ecx, dword [ebp - 0x38]
cmp ecx, 0x18
jne 0x40db9f
mov eax, dword [esi]
lea eax, [eax + eax*2]
jmp 0x40dbac
cmp ecx, 0x10
jne 0x40dbaa
mov eax, dword [esi]
add eax, eax
jmp 0x40dbac
xor eax, eax
neg eax
and eax, 3
mov dword [ebp - 0x68], eax
cmp ecx, 0x18
jne 0x40dbc7
mov dword [ebp - 0x50], 1
xor ecx, ecx
jmp 0x40dd6c
mov edx, dword [ebp - 0x44]
cmp ecx, 0x20
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x3c]
jne 0x40dc03
cmp edx, 0xff
jne 0x40dc03
cmp eax, 0xff00
jne 0x40dc03
cmp ecx, 0xff0000
jne 0x40dc03
cmp dword [ebp - 0x24], 0xff000000
jne 0x40dc1b
mov dword [ebp - 0x50], 2
xor ecx, ecx
jmp 0x40dd6c
test ecx, ecx
je 0x40e377
test eax, eax
je 0x40e377
test edx, edx
je 0x40e377
call fcn.0040cdd0
sub eax, 7
mov dword [ebp - 0x54], 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 - 0x10]
movzx eax, al
mov dword [ebp - 0x58], eax
call fcn.0040cdd0
sub eax, 7
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x10]
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 - 0x44]
movzx eax, al
mov dword [ebp - 0x34], eax
call fcn.0040cdd0
sub eax, 7
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x44]
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 - 0x24]
movzx eax, al
mov dword [ebp - 0x20], eax
call fcn.0040cdd0
sub eax, 7
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x24]
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
movzx ecx, al
mov dword [ebp - 0x18], ecx
mov edx, dword [esi + 4]
mov eax, edx
mov dword [ebp - 0x4c], 0
mov dword [ebp - 8], eax
test edx, edx
jle 0x40e2b2
mov eax, dword [ebp - 0x54]
neg eax
mov dword [ebp - 0x6c], eax
mov eax, 8
sub eax, dword [ebp - 0x58]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x5c]
neg eax
mov dword [ebp - 0x74], eax
mov eax, 8
sub eax, dword [ebp - 0x34]
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x1c]
neg eax
mov dword [ebp - 0x7c], eax
mov eax, 8
sub eax, dword [ebp - 0x20]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0x40]
neg eax
mov dword [ebp - 0x84], eax
mov eax, 8
sub eax, ecx
mov dword [ebp - 0x88], eax
mov eax, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov dword [ebp - 0xc], eax
nop dword [eax]
cmp dword [ebp - 0x50], 0
mov eax, dword [esi]
je 0x40e011
mov dword [ebp - 8], 0
test eax, eax
jle 0x40e270
mov ecx, dword [ebx]
nop dword [eax]
mov edx, dword [esi + 0xac]
cmp ecx, edx
jae 0x40de14
mov al, byte [ecx]
inc ecx
mov byte [ebp - 1], al
mov dword [ebx], ecx
jmp 0x40de75
cmp dword [esi + 0x20], 0
je 0x40de71
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
add esp, 0xc
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x40de5a
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xac], eax
mov eax, dword [ebx]
mov byte [eax], 0
mov eax, dword [ebx]
mov edx, dword [esi + 0xac]
mov cl, byte [eax]
mov byte [ebp - 1], cl
lea ecx, [eax + 1]
mov dword [ebx], ecx
jmp 0x40de75
lea edx, [eax + ecx]
mov eax, dword [ebx]
mov dword [esi + 0xac], edx
mov cl, byte [eax]
mov byte [ebp - 1], cl
lea ecx, [eax + 1]
mov dword [ebx], ecx
jmp 0x40de75
mov byte [ebp - 1], 0
mov eax, dword [ebp - 0x14]
mov bl, byte [ebp - 1]
mov byte [edi + eax + 2], bl
mov ebx, dword [ebp - 0x2c]
cmp ecx, edx
jae 0x40de93
mov al, byte [ecx]
inc ecx
mov byte [ebp - 1], al
mov eax, dword [ebp - 0x14]
mov dword [ebx], ecx
jmp 0x40defa
cmp dword [esi + 0x20], 0
je 0x40def6
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
add esp, 0xc
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x40dedc
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xac], eax
mov eax, dword [ebx]
mov byte [eax], 0
mov eax, dword [ebx]
mov edx, dword [esi + 0xac]
mov cl, byte [eax]
mov byte [ebp - 1], cl
lea ecx, [eax + 1]
mov eax, dword [ebp - 0x14]
mov dword [ebx], ecx
jmp 0x40defa
lea edx, [eax + ecx]
mov eax, dword [ebx]
mov dword [esi + 0xac], edx
mov cl, byte [eax]
mov byte [ebp - 1], cl
lea ecx, [eax + 1]
mov eax, dword [ebp - 0x14]
mov dword [ebx], ecx
jmp 0x40defa
mov byte [ebp - 1], 0
mov bl, byte [ebp - 1]
mov byte [edi + eax + 1], bl
mov ebx, dword [ebp - 0x2c]
cmp ecx, edx
jae 0x40df0f
mov al, byte [ecx]
inc ecx
mov dword [ebx], ecx
jmp 0x40df6d
cmp dword [esi + 0x20], 0
je 0x40df6b
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
add esp, 0xc
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x40df52
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xac], eax
mov eax, dword [ebx]
mov byte [eax], 0
mov eax, dword [ebx]
mov cl, byte [eax]
mov byte [ebp - 1], cl
lea ecx, [eax + 1]
mov al, byte [ebp - 1]
mov dword [ebx], ecx
jmp 0x40df6d
add eax, ecx
mov dword [esi + 0xac], eax
mov eax, dword [ebx]
mov cl, byte [eax]
mov byte [ebp - 1], cl
lea ecx, [eax + 1]
mov al, byte [ebp - 1]
mov dword [ebx], ecx
jmp 0x40df6d
xor al, al
mov edx, dword [ebp - 0x14]
mov byte [edx + edi], al
add edx, 3
cmp dword [ebp - 0x50], 2
mov dword [ebp - 0x14], edx
jne 0x40dfe2
cmp ecx, dword [esi + 0xac]
jae 0x40df8e
mov al, byte [ecx]
inc ecx
mov dword [ebx], ecx
jmp 0x40dfe4
cmp dword [esi + 0x20], 0
je 0x40dfde
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
add esp, 0xc
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x40dfc2
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xac], eax
mov eax, dword [ebx]
mov byte [eax], 0
jmp 0x40dfca
add eax, ecx
mov dword [esi + 0xac], eax
mov eax, dword [ebx]
mov edx, dword [ebp - 0x14]
mov cl, byte [eax]
mov byte [ebp - 1], cl
lea ecx, [eax + 1]
mov al, byte [ebp - 1]
mov dword [ebx], ecx
jmp 0x40dfe7
xor al, al
jmp 0x40dfe4
or al, 0xff
mov byte [ebp - 1], al
movzx eax, al
or dword [ebp - 0x48], eax
cmp dword [ebp - 0x24], 0
je 0x40dffd
mov al, byte [ebp - 1]
mov byte [edx + edi], al
inc edx
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
cmp eax, dword [esi]
jl 0x40de00
jmp 0x40e270
mov dword [ebp - 0x64], 0
test eax, eax
jle 0x40e270
mov ecx, esi
call fcn.00404090
cmp dword [ebp - 0x38], 0x10
jne 0x40e031
mov ebx, eax
jmp 0x40e044
mov ecx, esi
mov edi, eax
call fcn.00404090
mov ebx, eax
shl ebx, 0x10
add ebx, edi
mov edi, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x54]
mov edx, ebx
and edx, dword [ebp - 0x3c]
mov eax, edx
shr eax, cl
mov ecx, dword [ebp - 0x6c]
shl edx, cl
cmp dword [ebp - 0x54], 0
cmovge edx, eax
mov dword [ebp - 8], edx
cmp edx, 0x100
jb 0x40e07f
push 0x141f
push str.C:Users_adeptDesktopMAADeditorMAADeditorCode_stb_image.h
push str.v___0__v___256
call dword [ebp - 0xc]
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x70]
shr edx, cl
mov ecx, dword [ebp - 0x58]
mov dword [ebp - 8], edx
cmp ecx, 8
jbe 0x40e0aa
push 0x1421
push str.C:Users_adeptDesktopMAADeditorMAADeditorCode_stb_image.h
push str.bits___0__bits___8
call dword [ebp - 0xc]
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x58]
mov eax, dword [ecx*4 + 0x4876f4]
mov ecx, dword [ecx*4 + 0x487804]
imul eax, edx
mov edx, ebx
and edx, dword [ebp - 0x10]
sar eax, cl
mov ecx, dword [ebp - 0x14]
mov byte [ecx + edi], al
inc ecx
mov eax, edx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x5c]
shr eax, cl
mov ecx, dword [ebp - 0x74]
shl edx, cl
cmp dword [ebp - 0x5c], 0
cmovge edx, eax
mov dword [ebp - 8], edx
cmp edx, 0x100
jb 0x40e102
push 0x141f
push str.C:Users_adeptDesktopMAADeditorMAADeditorCode_stb_image.h
push str.v___0__v___256
call dword [ebp - 0xc]
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x78]
shr edx, cl
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 8], edx
cmp ecx, 8
jbe 0x40e12d
push 0x1421
push str.C:Users_adeptDesktopMAADeditorMAADeditorCode_stb_image.h
push str.bits___0__bits___8
call dword [ebp - 0xc]
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x34]
mov eax, dword [ecx*4 + 0x4876f4]
mov ecx, dword [ecx*4 + 0x487804]
imul eax, edx
mov edx, ebx
and edx, dword [ebp - 0x44]
sar eax, cl
mov ecx, dword [ebp - 0x14]
mov byte [ecx + edi], al
inc ecx
mov eax, edx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x1c]
shr eax, cl
mov ecx, dword [ebp - 0x7c]
shl edx, cl
cmp dword [ebp - 0x1c], 0
cmovge edx, eax
mov dword [ebp - 8], edx
cmp edx, 0x100
jb 0x40e185
push 0x141f
push str.C:Users_adeptDesktopMAADeditorMAADeditorCode_stb_image.h
push str.v___0__v___256
call dword [ebp - 0xc]
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x80]
shr edx, cl
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 8], edx
cmp ecx, 8
jbe 0x40e1b0
push 0x1421
push str.C:Users_adeptDesktopMAADeditorMAADeditorCode_stb_image.h
push str.bits___0__bits___8
call dword [ebp - 0xc]
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx*4 + 0x4876f4]
mov ecx, dword [ecx*4 + 0x487804]
imul eax, edx
sar eax, cl
mov ecx, dword [ebp - 0x14]
mov byte [ecx + edi], al
inc ecx
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x14], ecx
test eax, eax
je 0x40e249
mov edx, dword [ebp - 0x40]
and ebx, eax
mov eax, ebx
mov ecx, edx
shr eax, cl
mov ecx, dword [ebp - 0x84]
shl ebx, cl
test edx, edx
cmovns ebx, eax
cmp ebx, 0x100
jb 0x40e209
push 0x141f
push str.C:Users_adeptDesktopMAADeditorMAADeditorCode_stb_image.h
push str.v___0__v___256
call dword [ebp - 0xc]
add esp, 0xc
mov ecx, dword [ebp - 0x88]
shr ebx, cl
mov ecx, dword [ebp - 0x18]
cmp ecx, 8
jbe 0x40e231
push 0x1421
push str.C:Users_adeptDesktopMAADeditorMAADeditorCode_stb_image.h
push str.bits___0__bits___8
call dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
add esp, 0xc
mov eax, dword [ecx*4 + 0x4876f4]
mov ecx, dword [ecx*4 + 0x487804]
imul eax, ebx
sar eax, cl
mov ecx, dword [ebp - 0x14]
jmp 0x40e24e
mov eax, 0xff
or dword [ebp - 0x48], eax
cmp dword [ebp - 0x24], 0
je 0x40e25e
mov byte [ecx + edi], al
inc ecx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x64]
inc ecx
mov dword [ebp - 0x64], ecx
cmp ecx, dword [esi]
jl 0x40e020
mov ebx, dword [ebp - 0x2c]
cmp dword [esi + 0x10], 0
mov edx, dword [ebp - 0x68]
je 0x40e299
mov eax, dword [esi + 0xac]
mov ecx, eax
sub ecx, dword [ebx]
cmp ecx, edx
jge 0x40e299
sub edx, ecx
mov dword [ebx], eax
mov eax, dword [esi + 0x14]
push edx
push dword [esi + 0x1c]
call eax
add esp, 8
jmp 0x40e29b
add dword [ebx], edx
mov ecx, dword [ebp - 0x4c]
mov edx, dword [esi + 4]
inc ecx
mov dword [ebp - 0x4c], ecx
mov eax, edx
mov dword [ebp - 8], eax
cmp ecx, edx
jl 0x40dde0
cmp dword [ebp - 0x24], 0
mov ecx, eax
je 0x40e2df
cmp dword [ebp - 0x48], 0
jne 0x40e2df
mov eax, dword [esi]
mov ecx, dword [ebp - 8]
imul eax, edx
lea eax, [eax*4 - 1]
test eax, eax
js 0x40e2df
mov byte [eax + edi], 0xff
sub eax, 4
jns 0x40e2d3
mov ecx, dword [esi + 4]
cmp dword [ebp - 0x60], 0
jle 0x40e350
xor ebx, ebx
mov dword [ebp - 0x4c], ebx
test ecx, 0xfffffffe
jle 0x40e350
mov eax, dword [esi]
sub ecx, ebx
dec ecx
mov edx, eax
imul ecx, eax
imul eax, dword [ebp - 0x30]
imul edx, ebx
xor ebx, ebx
imul ecx, dword [ebp - 0x30]
imul edx, dword [ebp - 0x30]
mov dword [ebp - 0x60], edx
lea edx, [ecx + edi]
test eax, eax
jle 0x40e33e
mov edi, dword [ebp - 0x60]
sub edi, ecx
nop dword [eax]
mov al, byte [edx]
lea edx, [edx + 1]
mov cl, byte [edx + edi - 1]
inc ebx
mov byte [edx + edi - 1], al
mov byte [edx - 1], cl
mov eax, dword [esi]
imul eax, dword [ebp - 0x30]
cmp ebx, eax
jl 0x40e320
mov edi, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x4c]
mov ecx, dword [esi + 4]
inc ebx
mov eax, ecx
mov dword [ebp - 0x4c], ebx
sar eax, 1
cmp ebx, eax
jl 0x40e2f2
mov ecx, dword [ebp - 0x8c]
mov eax, dword [esi]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
mov ecx, dword [esi + 4]
mov dword [eax], ecx
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x40e36e
mov eax, dword [esi + 8]
mov dword [ecx], eax
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov dword [0x4983b8], 0x48812c
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret