Function at 0x10001550
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x30
mov dword [ebp - 0x18], eax
mov eax, edx
shr eax, 0x10
mov dword [ebp - 0x1c], ecx
je 0x100016b0
cmp byte [edx], 0x23
je 0x10001730
mov dword [esp + 8], edx
mov edi, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], 0
call edi
mov ebx, eax
sub esp, 0x18
lea edx, [ebx + ebx]
mov dword [esp + 4], 0
mov dword [esp + 8], edx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x20], eax
sub esp, 0xc
test eax, eax
je 0x100016c6
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 0
call edi
lea eax, [ebx - 1]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x18]
sub esp, 0x18
movzx eax, word [eax + 0xc]
lea edx, [eax - 1]
test eax, eax
je 0x1000167d
xor edi, edi
jmp 0x10001636
movzx eax, word [ebx]
cmp eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x14]
je 0x100016f8
lea edi, [esi + 1]
cmp edi, edx
jg 0x1000167d
mov eax, dword [ebp - 0x18]
lea esi, [edx + edi]
mov dword [ebp - 0x10], edx
sar esi, 1
lea ecx, [eax + esi*8 + 0x10]
mov ebx, dword [ecx]
mov dword [ebp - 0x14], ecx
and ebx, 0x7fffffff
add ebx, dword [ebp - 0x1c]
movzx eax, word [ebx]
mov dword [esp + 8], eax
lea eax, [ebx + 2]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsnicmp]
mov edx, dword [ebp - 0x10]
test eax, eax
je 0x10001620
jns 0x1000162f
lea edx, [esi - 1]
cmp edi, edx
jle 0x10001636
xor ebx, ebx
mov edi, dword [ebp - 0x20]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], edi
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, ebx
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp - 0x18]
movzx edx, word [eax + 0xc]
movzx eax, word [eax + 0xe]
lea ecx, [edx + eax - 1]
cmp edx, ecx
jle 0x100016df
lea esp, [ebp - 0xc]
xor ebx, ebx
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
lea ecx, [eax - 1]
cmp edx, ecx
jg 0x100016c6
lea eax, [ecx + edx]
sar eax, 1
lea ebx, [edi + eax*8 + 0x10]
cmp si, word [ebx]
je 0x10001710
jb 0x100016d8
lea edx, [eax + 1]
jmp 0x100016db
mov eax, dword [ecx + 4]
mov ebx, dword [ebp - 0x1c]
and eax, 0x7fffffff
add ebx, eax
jmp 0x1000167f
mov eax, dword [ebx + 4]
mov ebx, dword [ebp - 0x1c]
lea esp, [ebp - 0xc]
and eax, 0x7fffffff
add ebx, eax
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
add esi, 1
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_atoi]
mov edi, dword [ebp - 0x18]
mov esi, eax
movzx edx, word [edi + 0xc]
movzx eax, word [edi + 0xe]
lea ecx, [edx + eax - 1]
cmp edx, ecx
jle 0x1000176b
jmp 0x100016c6
lea ecx, [eax - 1]
cmp ecx, edx
jl 0x100016c6
lea eax, [edx + ecx]
sar eax, 1
lea ebx, [edi + eax*8 + 0x10]
cmp si, word [ebx]
je 0x10001710
jb 0x10001760
lea edx, [eax + 1]
jmp 0x10001763