Function at 0x461d82
Capabilities:
Access peb ldr_data

Disassembly:
sub esp, 0x20
mov eax, edx
mov dword [esp + 0xc], eax
push ebp
mov ebp, ecx
mov dword [esp + 0xc], ebp
cmp eax, 4
jne 0x461d9e
mov eax, ebp
jmp 0x461f46
push esi
mov esi, dword [esp + 0x30]
mov eax, esi
imul eax, dword [esp + 0x34]
push edi
shl eax, 3
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
mov dword [esp + 0x2c], edi
pop ecx
test edi, edi
jne 0x461de1
push ebp
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword fs:[0x2c]
pop ecx
mov eax, dword [eax]
mov dword [eax + 0xc], str.outofmem
xor eax, eax
jmp 0x461f44
and dword [esp + 0x1c], 0
cmp dword [esp + 0x38], 0
push ebx
jle 0x461f39
mov eax, dword [esp + 0x1c]
lea ebx, [esi - 1]
mov edx, esi
mov dword [esp + 0x24], ebp
shl edx, 3
mov dword [esp + 0x14], edx
mov edx, edi
mov edi, dword [esp + 0x14]
lea ecx, [eax*8 + 4]
imul eax, esi
mov esi, ebp
mov dword [esp + 0x10], ecx
mov dword [esp + 0x28], edx
add eax, eax
mov dword [esp + 0x1c], eax
mov eax, ecx
cmp ecx, 0x19
jg 0x461f99
sub eax, 0xa
je 0x461f6c
sub eax, 1
je 0x461f4b
sub eax, 1
je 0x461ed8
sub eax, 5
je 0x461eb8
dec eax
sub eax, 1
je 0x461e90
sub eax, 1
jne 0x4620e7
mov ecx, ebx
test ecx, ecx
js 0x461f90
sub ecx, 1
movzx eax, word [esi]
mov word [edx + 4], ax
lea esi, [esi + 4]
mov word [edx + 2], ax
mov word [edx], ax
lea edx, [edx + 8]
mov ax, word [esi - 2]
mov word [edx - 2], ax
jns 0x461e6a
jmp 0x461f90
mov ecx, ebx
test ecx, ecx
js 0x461f90
sub ecx, 1
movzx eax, word [esi]
mov word [edx + 4], ax
lea esi, [esi + 4]
mov word [edx + 2], ax
mov word [edx], ax
lea edx, [edx + 6]
jns 0x461e9a
jmp 0x461f90
mov ecx, ebx
test ecx, ecx
js 0x461f90
sub ecx, 1
mov ax, word [esi]
mov word [edx], ax
lea esi, [esi + 4]
lea edx, [edx + 2]
jns 0x461ec2
jmp 0x461f90
mov ecx, ebx
test ecx, ecx
js 0x461f90
mov edi, 0xffff
sub ecx, 1
movzx eax, word [esi]
mov word [edx + 4], ax
lea esi, [esi + 2]
mov word [edx + 2], ax
mov word [edx], ax
lea edx, [edx + 8]
mov word [edx - 2], di
jns 0x461ee7
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
inc eax
mov edx, dword [esp + 0x28]
add esi, dword [esp + 0x1c]
add edx, edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], edx
cmp eax, dword [esp + 0x3c]
jl 0x461e26
mov edi, dword [esp + 0x2c]
push ebp
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, edi
pop ecx
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x20
ret
mov ecx, ebx
test ecx, ecx
js 0x461f90
sub ecx, 1
movzx eax, word [esi]
mov word [edx + 4], ax
lea esi, [esi + 2]
mov word [edx + 2], ax
mov word [edx], ax
lea edx, [edx + 6]
jns 0x461f51
jmp 0x461f90
mov ecx, ebx
test ecx, ecx
js 0x461f90
mov ebp, 0xffff
sub ecx, 1
mov ax, word [esi]
mov word [edx], ax
lea esi, [esi + 2]
mov word [edx + 2], bp
lea edx, [edx + 4]
jns 0x461f77
mov ebp, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
jmp 0x461f0c
sub eax, 0x1a
je 0x46209f
dec eax
sub eax, 1
je 0x462066
sub eax, 5
je 0x46202b
sub eax, 1
je 0x461fe8
sub eax, 1
jne 0x4620e7
mov ecx, ebx
test ecx, ecx
js 0x461f90
sub ecx, 1
mov ax, word [esi]
mov word [edx], ax
lea esi, [esi + 8]
mov ax, word [esi - 6]
lea edx, [edx + 6]
mov word [edx - 4], ax
mov ax, word [esi - 4]
mov word [edx - 2], ax
jns 0x461fc5
jmp 0x461f90
mov edi, ebx
test edi, edi
js 0x461f08
movzx eax, word [esi + 2]
imul ecx, eax, 0x96
movzx eax, word [esi + 4]
imul eax, eax, 0x1d
add ecx, eax
movzx eax, word [esi]
imul eax, eax, 0x4d
lea esi, [esi + 8]
add ecx, eax
shr ecx, 8
sub edi, 1
mov word [edx], cx
lea edx, [edx + 4]
mov ax, word [esi - 2]
mov word [edx - 2], ax
jns 0x461ff2
jmp 0x461f04
mov edi, ebx
test edi, edi
js 0x461f08
movzx eax, word [esi + 2]
imul ecx, eax, 0x96
movzx eax, word [esi + 4]
imul eax, eax, 0x1d
add ecx, eax
movzx eax, word [esi]
imul eax, eax, 0x4d
lea esi, [esi + 8]
add ecx, eax
shr ecx, 8
sub edi, 1
mov word [edx], cx
lea edx, [edx + 2]
jns 0x462035
jmp 0x461f04
mov ecx, ebx
test ecx, ecx
js 0x461f90
mov ebp, 0xffff
sub ecx, 1
mov ax, word [esi]
mov word [edx], ax
lea esi, [esi + 6]
mov ax, word [esi - 4]
lea edx, [edx + 8]
mov word [edx - 6], ax
mov ax, word [esi - 2]
mov word [edx - 4], ax
mov word [edx - 2], bp
jns 0x462075
jmp 0x461f8c
mov edi, ebx
test edi, edi
js 0x461f08
mov ebp, 0xffff
movzx eax, word [esi + 2]
imul ecx, eax, 0x96
movzx eax, word [esi + 4]
imul eax, eax, 0x1d
add ecx, eax
movzx eax, word [esi]
imul eax, eax, 0x4d
lea esi, [esi + 6]
mov word [edx + 2], bp
add ecx, eax
shr ecx, 8
sub edi, 1
mov word [edx], cx
lea edx, [edx + 4]
jns 0x4620ae
mov ebp, dword [esp + 0x18]
jmp 0x461f04
push ebp
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push dword [esp + 0x30]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword fs:[0x2c]
pop ecx
mov eax, dword [eax]
mov dword [eax + 0xc], str.unsupported
xor eax, eax
jmp 0x461f42