Function at 0x47ade2
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 0x47adfe
mov eax, ebp
jmp 0x47afa6
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 0x47ae41
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 0x47afa4
and dword [esp + 0x1c], 0
cmp dword [esp + 0x38], 0
push ebx
jle 0x47af99
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 0x47aff9
sub eax, 0xa
je 0x47afcc
sub eax, 1
je 0x47afab
sub eax, 1
je 0x47af38
sub eax, 5
je 0x47af18
dec eax
sub eax, 1
je 0x47aef0
sub eax, 1
jne 0x47b147
mov ecx, ebx
test ecx, ecx
js 0x47aff0
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 0x47aeca
jmp 0x47aff0
mov ecx, ebx
test ecx, ecx
js 0x47aff0
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 0x47aefa
jmp 0x47aff0
mov ecx, ebx
test ecx, ecx
js 0x47aff0
sub ecx, 1
mov ax, word [esi]
mov word [edx], ax
lea esi, [esi + 4]
lea edx, [edx + 2]
jns 0x47af22
jmp 0x47aff0
mov ecx, ebx
test ecx, ecx
js 0x47aff0
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 0x47af47
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 0x47ae86
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 0x47aff0
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 0x47afb1
jmp 0x47aff0
mov ecx, ebx
test ecx, ecx
js 0x47aff0
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 0x47afd7
mov ebp, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
jmp 0x47af6c
sub eax, 0x1a
je 0x47b0ff
dec eax
sub eax, 1
je 0x47b0c6
sub eax, 5
je 0x47b08b
sub eax, 1
je 0x47b048
sub eax, 1
jne 0x47b147
mov ecx, ebx
test ecx, ecx
js 0x47aff0
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 0x47b025
jmp 0x47aff0
mov edi, ebx
test edi, edi
js 0x47af68
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 0x47b052
jmp 0x47af64
mov edi, ebx
test edi, edi
js 0x47af68
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 0x47b095
jmp 0x47af64
mov ecx, ebx
test ecx, ecx
js 0x47aff0
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 0x47b0d5
jmp 0x47afec
mov edi, ebx
test edi, edi
js 0x47af68
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 0x47b10e
mov ebp, dword [esp + 0x18]
jmp 0x47af64
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 0x47afa2