Function at 0x462792
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 0x4627ae
mov eax, ebp
jmp 0x462956
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 0x4627f1
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 0x462954
and dword [esp + 0x1c], 0
cmp dword [esp + 0x38], 0
push ebx
jle 0x462949
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 0x4629a9
sub eax, 0xa
je 0x46297c
sub eax, 1
je 0x46295b
sub eax, 1
je 0x4628e8
sub eax, 5
je 0x4628c8
dec eax
sub eax, 1
je 0x4628a0
sub eax, 1
jne 0x462af7
mov ecx, ebx
test ecx, ecx
js 0x4629a0
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 0x46287a
jmp 0x4629a0
mov ecx, ebx
test ecx, ecx
js 0x4629a0
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 0x4628aa
jmp 0x4629a0
mov ecx, ebx
test ecx, ecx
js 0x4629a0
sub ecx, 1
mov ax, word [esi]
mov word [edx], ax
lea esi, [esi + 4]
lea edx, [edx + 2]
jns 0x4628d2
jmp 0x4629a0
mov ecx, ebx
test ecx, ecx
js 0x4629a0
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 0x4628f7
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 0x462836
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 0x4629a0
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 0x462961
jmp 0x4629a0
mov ecx, ebx
test ecx, ecx
js 0x4629a0
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 0x462987
mov ebp, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
jmp 0x46291c
sub eax, 0x1a
je 0x462aaf
dec eax
sub eax, 1
je 0x462a76
sub eax, 5
je 0x462a3b
sub eax, 1
je 0x4629f8
sub eax, 1
jne 0x462af7
mov ecx, ebx
test ecx, ecx
js 0x4629a0
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 0x4629d5
jmp 0x4629a0
mov edi, ebx
test edi, edi
js 0x462918
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 0x462a02
jmp 0x462914
mov edi, ebx
test edi, edi
js 0x462918
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 0x462a45
jmp 0x462914
mov ecx, ebx
test ecx, ecx
js 0x4629a0
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 0x462a85
jmp 0x46299c
mov edi, ebx
test edi, edi
js 0x462918
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 0x462abe
mov ebp, dword [esp + 0x18]
jmp 0x462914
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 0x462952