Function at 0x10162d50
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x2c
push ebp
mov ebp, dword [esp + 0x34]
test ebp, ebp
je 0x1016364a
mov eax, dword [ebp + 0x78]
test al, 0x40
je 0x10162d85
push str.invalid_after_png_start_read_image_or_png_read_update_info
push ebp
test eax, 0x400000
je 0x1016366b
call sym.WMCommon.dll_png_warning
add esp, 8
pop ebp
add esp, 0x2c
ret
or dword [ebp + 0x7c], 0x40
or eax, 0x4000
push esi
mov esi, dword [esp + 0x40]
push edi
mov edi, dword [esp + 0x50]
mov dword [ebp + 0x78], eax
test edi, edi
jne 0x10162dbd
push esi
push ebp
call sym.WMCommon.dll_png_malloc
add esp, 8
mov dword [ebp + 0x20c], eax
xor ecx, ecx
test esi, esi
jle 0x10162dbd
mov byte [eax + ecx], cl
inc ecx
cmp ecx, esi
jl 0x10162db5
push ebx
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
cmp esi, dword [esp + 0x4c]
jle 0x1016346f
push esi
push ebp
call sym.WMCommon.dll_png_malloc
mov edi, dword [esp + 0x58]
add esp, 8
mov ebx, eax
mov dword [esp + 0x1c], ebx
test edi, edi
je 0x10163091
mov edx, dword [esp + 0x48]
xor eax, eax
mov dword [ebp + 0x280], ebx
test edx, edx
jle 0x10162e08
nop word [eax + eax]
mov byte [ebx + eax], al
inc eax
cmp eax, edx
jl 0x10162e00
lea esi, [edx - 1]
cmp esi, dword [esp + 0x4c]
jl 0x10162e62
xor edx, edx
mov ebp, 1
test esi, esi
jle 0x10162e5a
nop dword [eax]
mov al, byte [ebx + edx]
movzx ecx, byte [ebx + edx + 1]
mov byte [esp + 0x13], al
movzx eax, al
mov ax, word [edi + eax*2]
cmp ax, word [edi + ecx*2]
jae 0x10162e4a
mov al, byte [ebx + edx + 1]
xor ebp, ebp
mov byte [ebx + edx], al
mov al, byte [esp + 0x13]
mov byte [ebx + edx + 1], al
inc edx
cmp edx, esi
jl 0x10162e20
test ebp, ebp
jne 0x10162e5a
dec esi
cmp esi, dword [esp + 0x4c]
jge 0x10162e11
mov ebp, dword [esp + 0x40]
mov edx, dword [esp + 0x48]
cmp dword [esp + 0x54], 0
mov edi, dword [esp + 0x4c]
je 0x10162ec6
xor esi, esi
test edi, edi
jle 0x10163055
mov ebp, dword [esp + 0x44]
mov edi, ebp
mov ecx, dword [esp + 0x4c]
movzx eax, byte [ebx + esi]
cmp eax, ecx
jl 0x10162eb5
nop dword [eax]
movzx eax, byte [ebx + edx - 1]
dec edx
cmp eax, ecx
jge 0x10162e90
lea ecx, [edx*2]
add ecx, ebp
mov ax, word [ecx + edx]
mov word [edi], ax
mov al, byte [ecx + edx + 2]
mov ecx, dword [esp + 0x4c]
mov byte [edi + 2], al
inc esi
add edi, 3
cmp esi, ecx
jl 0x10162e81
mov edi, dword [esp + 0x4c]
jmp 0x10163051
xor eax, eax
mov ecx, edx
mov dword [esp + 0x24], eax
test edi, edi
jle 0x10162f3c
mov edx, dword [esp + 0x44]
mov esi, edx
movzx eax, byte [ebx + eax]
cmp eax, edi
jl 0x10162f28
movzx eax, byte [ebx + ecx - 1]
dec ecx
cmp eax, edi
jge 0x10162ee0
lea eax, [edx + ecx*2]
mov dword [esp + 0x2c], ecx
mov dx, word [ecx + eax]
add ecx, eax
mov ax, word [esi]
mov bl, byte [ecx + 2]
mov word [ecx], ax
mov al, byte [esi + 2]
mov byte [ecx + 2], al
mov eax, dword [ebp + 0x20c]
mov ecx, dword [esp + 0x2c]
mov word [esi], dx
mov edx, dword [esp + 0x24]
mov byte [esi + 2], bl
mov ebx, dword [esp + 0x1c]
mov byte [eax + ecx], dl
mov byte [eax + edx], cl
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x24]
add esi, 3
inc eax
mov dword [esp + 0x24], eax
cmp eax, edi
jl 0x10162ed8
mov edx, dword [esp + 0x48]
xor esi, esi
mov dword [esp + 0x20], esi
test edx, edx
jle 0x10163055
mov eax, dword [ebp + 0x20c]
mov dword [esp + 0x14], eax
movzx ecx, byte [eax + esi]
cmp ecx, edi
jl 0x10163040
mov edx, dword [esp + 0x44]
lea eax, [edx + ecx*2]
movzx ebx, byte [ecx + eax + 2]
movzx edi, byte [ecx + eax + 1]
movzx eax, byte [ecx + eax]
movzx ecx, byte [edx + 1]
mov dword [esp + 0x28], eax
mov eax, edi
sub eax, ecx
mov dword [esp + 0x2c], ebx
cdq
mov ebp, eax
mov dword [esp + 0x18], edi
mov eax, dword [esp + 0x44]
xor ebp, edx
sub ebp, edx
movzx ecx, byte [eax + 2]
mov eax, ebx
sub eax, ecx
xor ebx, ebx
cdq
xor eax, edx
sub eax, edx
add ebp, eax
mov eax, dword [esp + 0x44]
movzx ecx, byte [eax]
mov eax, dword [esp + 0x28]
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
mov edx, 1
add ebp, eax
mov dword [esp + 0x24], edx
cmp dword [esp + 0x4c], edx
jle 0x10163031
nop dword [eax + eax]
mov eax, dword [esp + 0x44]
lea esi, [eax + edx*2]
mov eax, edi
add esi, edx
movzx ecx, byte [esi + 1]
sub eax, ecx
movzx ecx, byte [esi + 2]
cdq
mov edi, eax
mov eax, dword [esp + 0x2c]
sub eax, ecx
xor edi, edx
movzx ecx, byte [esi]
sub edi, edx
cdq
xor eax, edx
sub eax, edx
add edi, eax
mov eax, dword [esp + 0x28]
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x24]
lea ecx, [edi + eax]
mov edi, dword [esp + 0x18]
cmp ecx, ebp
mov eax, edx
cmovge eax, ebx
inc edx
cmp ecx, ebp
mov dword [esp + 0x24], edx
mov ebx, eax
cmovge ecx, ebp
mov ebp, ecx
cmp edx, dword [esp + 0x4c]
jl 0x10162fd0
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x48]
mov edi, dword [esp + 0x4c]
mov byte [eax + esi], bl
inc esi
mov dword [esp + 0x20], esi
cmp esi, edx
jl 0x10162f54
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x40]
test ebx, ebx
je 0x10163082
mov eax, dword [ebp + 0x278]
push ebx
test eax, eax
je 0x10163079
push ebp
call eax
add esp, 8
mov dword [ebp + 0x280], 0
jmp 0x1016345f
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov dword [ebp + 0x280], 0
jmp 0x1016345f
mov dword [ebp + 0x284], ebx
xor esi, esi
mov ebx, dword [esp + 0x48]
push ebx
push ebp
mov dword [esp + 0x1c], esi
call sym.WMCommon.dll_png_malloc
add esp, 8
mov dword [ebp + 0x288], eax
xor ecx, ecx
test ebx, ebx
jle 0x101630cb
mov edx, dword [ebp + 0x284]
nop dword [eax]
mov byte [edx + ecx], cl
mov byte [eax + ecx], cl
inc ecx
cmp ecx, ebx
jl 0x101630c0
mov eax, dword [ebp + 0x274]
push 0xc04
test eax, eax
je 0x101630e2
push ebp
call eax
add esp, 8
jmp 0x101630eb
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
je 0x10163660
push 0xc04
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 0x1c], 0x60
nop
xor ecx, ecx
lea edx, [ebx - 1]
mov dword [esp + 0x2c], ecx
test edx, edx
jle 0x10163226
mov eax, dword [esp + 0x44]
add eax, 2
mov dword [esp + 0x24], eax
nop dword [eax]
inc ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x28], ecx
cmp ecx, ebx
jge 0x1016320b
lea ecx, [eax + 2]
mov dword [esp + 0x20], ecx
nop dword [eax + eax]
movzx eax, byte [eax - 2]
movzx ecx, byte [ecx - 1]
sub eax, ecx
cdq
mov edi, eax
mov eax, dword [esp + 0x20]
xor edi, edx
sub edi, edx
movzx ecx, byte [eax + 1]
mov eax, dword [esp + 0x24]
movzx eax, byte [eax]
sub eax, ecx
mov ecx, dword [esp + 0x20]
cdq
xor eax, edx
sub eax, edx
movzx ecx, byte [ecx]
add edi, eax
mov eax, dword [esp + 0x24]
movzx eax, byte [eax - 1]
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
add edi, eax
cmp edi, dword [esp + 0x1c]
jg 0x101631e4
mov eax, dword [ebp + 0x274]
push 8
test eax, eax
je 0x101631b1
push ebp
call eax
mov esi, eax
add esp, 8
mov dword [esp + 0x14], esi
jmp 0x101631c0
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [esp + 0x14], eax
mov esi, eax
test esi, esi
je 0x10163399
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + edi*4]
mov dword [esi], eax
mov eax, dword [esp + 0x2c]
mov byte [esi + 4], al
mov eax, dword [esp + 0x28]
mov byte [esi + 5], al
mov dword [ecx + edi*4], esi
jmp 0x101631e8
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
inc eax
add ecx, 3
mov dword [esp + 0x28], eax
cmp eax, ebx
mov dword [esp + 0x20], ecx
mov eax, dword [esp + 0x24]
jl 0x10163150
mov ecx, dword [esp + 0x30]
lea edx, [ebx - 1]
test esi, esi
je 0x10163370
add eax, 3
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x24], eax
cmp ecx, edx
jl 0x10163130
test esi, esi
je 0x10163370
xor eax, eax
mov dword [esp + 0x20], eax
cmp dword [esp + 0x1c], eax
jl 0x10163370
nop
mov ecx, dword [esp + 0x18]
mov ecx, dword [ecx + eax*4]
mov dword [esp + 0x24], ecx
test ecx, ecx
je 0x10163361
mov eax, dword [esp + 0x44]
mov edi, dword [ebp + 0x284]
lea eax, [eax + ebx*2]
add eax, ebx
mov dword [esp + 0x2c], eax
movzx edx, byte [ecx + 4]
movzx eax, byte [edx + edi]
cmp eax, ebx
jge 0x10163343
movzx ecx, byte [ecx + 5]
movzx eax, byte [ecx + edi]
cmp eax, ebx
jge 0x1016333f
mov eax, ebx
mov ebp, ecx
and eax, 1
cmove ebp, edx
test eax, eax
mov dword [esp + 0x30], ebp
mov ebp, dword [esp + 0x2c]
cmove edx, ecx
mov ecx, dword [esp + 0x44]
sub ebp, 3
dec ebx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x34], edx
lea eax, [edi + edx]
mov dword [esp + 0x28], eax
movzx eax, byte [eax]
lea ecx, [ecx + eax*2]
add ecx, eax
cmp dword [esp + 0x54], 0
mov ax, word [ebp]
mov word [ecx], ax
mov al, byte [ebp + 2]
mov ebp, dword [esp + 0x40]
mov byte [ecx + 2], al
jne 0x10163310
xor ecx, ecx
cmp dword [esp + 0x48], ecx
jle 0x10163310
mov esi, dword [ebp + 0x20c]
mov ebp, dword [esp + 0x30]
mov al, byte [esi + ecx]
cmp al, byte [edi + edx]
jne 0x101632f4
mov al, byte [edi + ebp]
mov byte [esi + ecx], al
movzx eax, al
cmp eax, ebx
jne 0x10163301
mov al, byte [edi + edx]
mov byte [esi + ecx], al
inc ecx
cmp ecx, dword [esp + 0x48]
jl 0x101632e6
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x40]
mov edx, dword [ebp + 0x288]
mov eax, dword [esp + 0x28]
movzx ecx, byte [edx + ebx]
movzx eax, byte [eax]
mov byte [ecx + edi], al
mov eax, dword [esp + 0x28]
movzx ecx, byte [eax]
movzx eax, byte [edx + ebx]
mov byte [ecx + edx], al
mov eax, dword [esp + 0x28]
mov byte [eax], bl
mov eax, dword [esp + 0x34]
mov byte [edx + ebx], al
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x4c]
cmp ebx, eax
jle 0x10163370
mov ecx, dword [ecx]
mov dword [esp + 0x24], ecx
test ecx, ecx
jne 0x10163266
cmp ebx, eax
jle 0x10163370
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
cmp eax, dword [esp + 0x1c]
jle 0x10163240
mov ecx, dword [esp + 0x18]
xor edi, edi
mov eax, dword [ecx + edi*4]
test eax, eax
je 0x101633c2
nop dword [eax]
mov ecx, dword [ebp + 0x278]
mov esi, dword [eax]
mov dword [esp + 0x14], esi
push eax
test ecx, ecx
je 0x101633af
push ebp
call ecx
add esp, 8
jmp 0x101633b8
push str.Out_of_memory
push ebp
call sym.WMCommon.dll_png_warning
add esp, 8
xor esi, esi
mov dword [esp + 0x14], esi
jmp 0x10163370
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, esi
test esi, esi
jne 0x10163380
mov ecx, dword [esp + 0x18]
mov dword [ecx + edi*4], 0
inc edi
cmp edi, 0x301
jl 0x10163376
add dword [esp + 0x1c], 0x60
mov edi, dword [esp + 0x4c]
cmp ebx, edi
jg 0x10163110
mov eax, dword [ebp + 0x278]
push ecx
test eax, eax
je 0x101633fc
push ebp
call eax
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 8
jmp 0x10163407
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call ebx
add esp, 4
mov eax, dword [ebp + 0x288]
test eax, eax
je 0x10163429
mov ecx, dword [ebp + 0x278]
push eax
test ecx, ecx
je 0x10163424
push ebp
call ecx
add esp, 8
jmp 0x10163429
call ebx
add esp, 4
mov eax, dword [ebp + 0x284]
test eax, eax
je 0x1016344b
mov ecx, dword [ebp + 0x278]
push eax
test ecx, ecx
je 0x10163446
push ebp
call ecx
add esp, 8
jmp 0x1016344b
call ebx
add esp, 4
mov dword [ebp + 0x288], 0
mov dword [ebp + 0x284], 0
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, edi
mov edi, dword [esp + 0x54]
mov dword [esp + 0x48], esi
cmp dword [ebp + 0x144], 0
jne 0x10163482
mov eax, dword [esp + 0x44]
mov dword [ebp + 0x144], eax
mov word [ebp + 0x148], si
test edi, edi
je 0x10163647
mov eax, dword [ebp + 0x274]
push 0x8000
test eax, eax
je 0x101634a8
push ebp
call eax
add esp, 8
jmp 0x101634ad
call ebx
add esp, 4
mov edi, eax
test edi, edi
je 0x10163660
push 0x8000
push 0
push edi
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp + 0x274]
add esp, 0xc
mov dword [ebp + 0x208], edi
push 0x8000
test eax, eax
je 0x101634ea
push ebp
call eax
mov ebx, eax
add esp, 8
mov dword [esp + 0x24], ebx
jmp 0x101634f5
call ebx
add esp, 4
mov dword [esp + 0x24], eax
mov ebx, eax
test ebx, ebx
je 0x10163660
push 0x8000
push 0xff
push ebx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 0x28], 0
test esi, esi
jle 0x10163636
mov ecx, dword [esp + 0x44]
add ecx, 2
mov dword [esp + 0x18], ecx
nop dword [eax + eax]
movzx esi, byte [ecx - 2]
movzx ebp, byte [ecx - 1]
movzx ebx, byte [ecx]
shr esi, 3
shr ebp, 3
shr ebx, 3
xor ecx, ecx
mov dword [esp + 0x38], esi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ecx
mov eax, esi
mov edx, ecx
sub edx, esi
sub eax, ecx
cmp ecx, esi
mov esi, ecx
cmovle edx, eax
shl esi, 0xa
xor ecx, ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x14], esi
mov dword [esp + 0x2c], ecx
mov eax, ebp
mov edi, ecx
sub edi, ebp
sub eax, ecx
cmp ecx, ebp
mov ebp, ecx
cmovle edi, eax
cmp edx, edi
lea eax, [edx + edi]
cmovg edi, edx
shl ebp, 5
or ebp, esi
mov dword [esp + 0x34], eax
xor edx, edx
mov esi, edx
mov eax, ebx
sub eax, edx
or esi, ebp
mov ecx, edx
sub ecx, ebx
cmp edx, ebx
cmovle ecx, eax
cmp edi, ecx
mov eax, ecx
cmovg eax, edi
add eax, ecx
mov ecx, dword [esp + 0x24]
add eax, dword [esp + 0x34]
movzx ecx, byte [ecx + esi]
cmp eax, ecx
jge 0x101635d6
mov ecx, dword [esp + 0x24]
mov byte [ecx + esi], al
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x28]
mov eax, dword [eax + 0x208]
mov byte [esi + eax], cl
inc edx
cmp edx, 0x20
jl 0x10163594
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
inc ecx
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
mov dword [esp + 0x2c], ecx
cmp ecx, 0x20
jl 0x10163572
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x38]
inc ecx
mov dword [esp + 0x20], ecx
cmp ecx, 0x20
jl 0x10163552
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
inc eax
add ecx, 3
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], ecx
cmp eax, dword [esp + 0x48]
jl 0x10163530
mov ebp, dword [esp + 0x40]
mov ebx, dword [esp + 0x24]
mov eax, dword [ebp + 0x278]
push ebx
test eax, eax
je 0x1016364f
push ebp
call eax
add esp, 8
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x2c
ret
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x2c
ret
push str.Out_of_memory
push ebp
call sym.WMCommon.dll_png_error
call sym.WMCommon.dll_png_error
int3