Function at 0x4f2f32
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 0x4f2f4e
mov eax, ebp
jmp 0x4f30f6
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 0x4f2f91
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 0x4f30f4
and dword [esp + 0x1c], 0
cmp dword [esp + 0x38], 0
push ebx
jle 0x4f30e9
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 0x4f3149
sub eax, 0xa
je 0x4f311c
sub eax, 1
je 0x4f30fb
sub eax, 1
je 0x4f3088
sub eax, 5
je 0x4f3068
dec eax
sub eax, 1
je 0x4f3040
sub eax, 1
jne 0x4f3297
mov ecx, ebx
test ecx, ecx
js 0x4f3140
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 0x4f301a
jmp 0x4f3140
mov ecx, ebx
test ecx, ecx
js 0x4f3140
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 0x4f304a
jmp 0x4f3140
mov ecx, ebx
test ecx, ecx
js 0x4f3140
sub ecx, 1
mov ax, word [esi]
mov word [edx], ax
lea esi, [esi + 4]
lea edx, [edx + 2]
jns 0x4f3072
jmp 0x4f3140
mov ecx, ebx
test ecx, ecx
js 0x4f3140
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 0x4f3097
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 0x4f2fd6
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 0x4f3140
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 0x4f3101
jmp 0x4f3140
mov ecx, ebx
test ecx, ecx
js 0x4f3140
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 0x4f3127
mov ebp, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
jmp 0x4f30bc
sub eax, 0x1a
je 0x4f324f
dec eax
sub eax, 1
je 0x4f3216
sub eax, 5
je 0x4f31db
sub eax, 1
je 0x4f3198
sub eax, 1
jne 0x4f3297
mov ecx, ebx
test ecx, ecx
js 0x4f3140
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 0x4f3175
jmp 0x4f3140
mov edi, ebx
test edi, edi
js 0x4f30b8
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 0x4f31a2
jmp 0x4f30b4
mov edi, ebx
test edi, edi
js 0x4f30b8
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 0x4f31e5
jmp 0x4f30b4
mov ecx, ebx
test ecx, ecx
js 0x4f3140
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 0x4f3225
jmp 0x4f313c
mov edi, ebx
test edi, edi
js 0x4f30b8
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 0x4f325e
mov ebp, dword [esp + 0x18]
jmp 0x4f30b4
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 0x4f30f2