Function at 0x1014f43
Capabilities:
Access peb ldr_data

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x1038008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
and dword [ebp - 0x18], 0
push esi
mov esi, dword [ebp + 8]
movzx eax, word [esi + 8]
mov ebx, dword [ebp + 0x14]
lea ecx, [eax + 1]
mov word [ebp - 0x10], cx
movzx ecx, word [esi + 0xa]
lea edx, [ecx + 1]
mov word [ebp - 0xe], dx
mov dx, word [esi + 0xc]
sub dx, ax
dec dx
movsx eax, dx
mov dword [ebp - 0x14], eax
mov ax, word [esi + 0xe]
sub ax, cx
dec ax
xor ecx, ecx
cmp cx, ax
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x28], ebx
jge 0x1014da2
lea eax, [ebp - 0x14]
push eax
movzx eax, word [esi + 0x10]
push 3
push dword [ebp - 0x10]
push eax
push ebx
call fcn.0100ab7c
lea eax, [ebp - 0x14]
push eax
push 4
push dword [ebp - 0x10]
push 0x20
push ebx
call fcn.0100ab7c
mov ax, word [esi + 0xe]
inc word [ebp - 0xe]
sub ax, word [esi + 0xa]
inc dword [ebp - 0x18]
dec ax
cmp word [ebp - 0x18], ax
jl 0x1014d66
movzx ecx, word [esi + 0xa]
movzx edx, word [esi + 0x18]
lea eax, [ecx + 1]
mov word [ebp - 0xe], ax
movzx eax, dx
sub ax, word [esi + 0xe]
lea ecx, [ecx + eax + 2]
test cx, cx
jle 0x1014dd4
mov cx, word [esi + 0xa]
add cx, ax
add cx, 2
movzx eax, cx
mov dword [ebp - 0x18], eax
jmp 0x1014dd8
and dword [ebp - 0x18], 0
cmp word [ebp - 0x18], dx
jg 0x1014fb8
movsx ebx, word [ebp - 0x18]
push 0xa
lea eax, [ebp - 0xc]
push eax
push ebx
call dword [sym.imp.msvcrt.dll__itoa]
add esp, 0xc
push eax
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
movzx ecx, word [esi + 8]
mov dx, word [esi + 0xc]
cwde
mov byte [ebp + eax - 0xc], 0x3a
mov byte [ebp + eax - 0xb], 0x20
inc eax
sub dx, cx
inc eax
dec dx
movsx edx, dx
mov dword [ebp - 0x24], eax
cmp eax, edx
jbe 0x1014e27
mov dword [ebp - 0x24], edx
push 0
lea eax, [ebp - 0x24]
push eax
push 1
inc ecx
mov word [ebp - 0x10], cx
push dword [ebp - 0x10]
push dword [ebp - 0x20]
push dword [ebp - 0x28]
call fcn.01023f67
movsx eax, word [edi + 0x16]
movsx ecx, word [edi + 0x18]
add eax, ebx
cdq
idiv ecx
movsx eax, dx
mov dx, word [esi + 0xc]
sub dx, word [esi + 8]
lea ecx, [edi + eax*4 + 0x28]
mov eax, dword [ecx]
movzx eax, word [eax]
shr eax, 1
dec dx
movsx edx, dx
sub edx, dword [ebp - 0x24]
mov dword [ebp - 0x14], eax
mov ebx, dword [ecx]
inc ebx
inc ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
test eax, eax
je 0x1014ec1
movzx eax, word [ebx]
dec dword [ebp - 0x20]
push eax
push dword [0x1038334]
push dword [0x1038268]
call fcn.0100a321
inc ebx
inc ebx
test eax, eax
je 0x1014ea2
sub dword [ebp - 0x1c], 2
jmp 0x1014ea5
dec dword [ebp - 0x1c]
xor eax, eax
cmp dword [ebp - 0x1c], eax
jle 0x1014eb3
cmp dword [ebp - 0x20], eax
je 0x1014ec1
jmp 0x1014e7e
mov ecx, dword [ebp - 0x20]
sub dword [ebp - 0x14], ecx
cmp dword [ebp - 0x1c], eax
jge 0x1014ec1
dec dword [ebp - 0x14]
mov ax, word [ebp - 0x24]
add word [ebp - 0x10], ax
mov eax, dword fs:[0x18]
mov edx, dword [ebp - 0x14]
mov ecx, dword [0x1038030]
mov eax, dword [eax + 0x30]
add edx, edx
push edx
add ecx, 0x300000
push ecx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ebx, eax
test ebx, ebx
je 0x1014fb8
mov eax, dword [ebp - 0x14]
movsx ecx, word [ebp - 0x18]
add eax, eax
push eax
movsx eax, word [edi + 0x16]
add eax, ecx
movsx ecx, word [edi + 0x18]
cdq
idiv ecx
movsx eax, dx
mov eax, dword [edi + eax*4 + 0x28]
inc eax
inc eax
push eax
push ebx
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
push 0
lea eax, [ebp - 0x14]
push eax
push 2
push dword [ebp - 0x10]
push ebx
push dword [ebp - 0x28]
call fcn.01023f67
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
movsx ecx, word [ebp - 0x18]
movsx eax, word [edi + 0x16]
add eax, ecx
movsx ecx, word [edi + 0x18]
cdq
idiv ecx
cmp dx, word [ebp + 0xc]
jne 0x1014fa3
movzx eax, word [esi + 8]
lea ecx, [eax + 1]
mov word [ebp - 0x10], cx
mov cx, word [esi + 0xc]
sub cx, ax
dec cx
movsx eax, cx
mov dword [ebp - 0x14], eax
movzx eax, word [esi + 0x10]
lea ecx, [ebp - 0x14]
push ecx
mov ecx, eax
push 3
push dword [ebp - 0x10]
shr ecx, 4
and eax, 0xf
and ecx, 0xf
shl eax, 4
or ecx, eax
push ecx
push dword [ebp - 0x28]
call fcn.0100ab7c
inc word [ebp - 0xe]
inc dword [ebp - 0x18]
mov ax, word [ebp - 0x18]
cmp ax, word [esi + 0x18]
jle 0x1014de2
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.010015a8
leave
ret 0x10