Function at 0x10003190
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x324
mov dword [ebp - 0x2fc], eax
mov dword [ebp - 0x310], 0x1031
cmp edx, 2
je 0x100031c6
xor eax, eax
cmp edx, 0x17
sete al
lea eax, [eax + eax + 0x1030]
mov dword [ebp - 0x310], eax
mov edi, dword [ebp - 0x2fc]
and ecx, 8
mov dword [ebp - 0x318], ecx
test edi, edi
jne 0x1000328e
jmp 0x10003640
mov eax, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x300], eax
mov dword [esp + 8], 0x200
mov dword [esp + 4], 0
mov ebx, dword fs:[0x18]
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x300]
call eax
mov edx, dword [ebp - 0x2fc]
sub esp, 0xc
mov dword [edx + 0x20], eax
test eax, eax
je 0x100036e9
xor edx, edx
lea edi, [ebp - 0x2f4]
mov word [eax], dx
lea eax, [ebp - 0x20e]
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 7
call sym._DnsQueryConfig_24
sub esp, 0x18
test eax, eax
je 0x100033e8
mov eax, dword [ebp - 0x2fc]
mov eax, dword [eax + 8]
mov dword [ebp - 0x2fc], eax
test eax, eax
je 0x10003640
lea eax, [ebp - 0x20e]
mov dword [esp + 0x14], 0x101
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x2fc]
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [eax + 0xc]
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 8], eax
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov esi, dword [ebp - 0x318]
sub esp, 0x18
test esi, esi
jne 0x100031e8
mov edx, dword fs:[0x18]
mov dword [ebp - 0x304], edx
lea edi, [ebp - 0x2f4]
lea eax, [ebp - 0x2ee]
mov esi, 5
mov dword [ebp - 0x300], edi
mov edi, eax
mov eax, dword [ebp - 0x300]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x20e]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x310]
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._DnsQueryConfig_24
mov dword [ebp - 0x2f8], eax
sub esp, 0x18
cmp eax, 0xea
jne 0x10003480
lea eax, [ebp - 0x2ee]
cmp edi, eax
je 0x10003379
mov eax, dword [ebp - 0x304]
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
mov eax, dword [ebp - 0x2f4]
mov dword [esp + 4], 0
mov ebx, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov edi, eax
test eax, eax
je 0x100036c7
sub esi, 1
jne 0x10003301
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
mov eax, dword [ebp - 0x2f8]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x2f4]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x300]
call eax
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x10003277
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x20e]
mov dword [esp + 0x14], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 7
call sym._DnsQueryConfig_24
sub esp, 0x18
test eax, eax
jne 0x10003457
cmp word [ebx], 0
jne 0x10003600
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
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_HeapFree]
sub esp, 0xc
jmp 0x10003277
mov ebx, dword [ebp - 0x2f8]
mov dword [ebp - 0x30c], edi
test ebx, ebx
jne 0x100036f8
mov eax, dword [ebp - 0x2fc]
mov ecx, dword [edi + 4]
add eax, 0x1c
mov dword [ebp - 0x304], eax
test ecx, ecx
je 0x10003658
mov eax, dword [ebp - 0x30c]
lea esi, [eax + 0x20]
mov eax, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x300], eax
mov eax, dword fs:[0x18]
mov dword [ebp - 0x308], eax
nop
mov ebx, dword [esi + 0x20]
mov eax, 0x20
mov dword [esp + 4], 8
cmp ebx, 0x20
cmova ebx, eax
lea eax, [ebx + 0x18]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x308]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x300]
call eax
sub esp, 0xc
test eax, eax
je 0x10003680
lea edi, [eax + 0x18]
mov dword [eax], 0x18
mov dword [eax + 0xc], edi
mov dword [eax + 0x10], ebx
cmp ebx, 4
jae 0x100035b0
test ebx, ebx
je 0x1000353a
movzx edx, byte [esi]
mov byte [eax + 0x18], dl
test bl, 2
jne 0x10003630
mov ecx, dword [ebp - 0x304]
add dword [ebp - 0x2f8], 1
add esi, 0x40
mov dword [ecx], eax
mov ecx, dword [ebp - 0x30c]
add eax, 8
mov dword [ebp - 0x304], eax
mov eax, dword [ebp - 0x2f8]
cmp dword [ecx + 4], eax
ja 0x100034d0
lea esi, [ebp - 0x2ee]
cmp dword [ebp - 0x30c], esi
je 0x100031f3
mov esi, dword [ebp - 0x30c]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], esi
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
jmp 0x100031f3
mov edx, dword [esi]
mov ecx, esi
mov dword [eax + 0x18], edx
mov edx, dword [esi + ebx - 4]
mov dword [edi + ebx - 4], edx
lea edx, [eax + 0x1c]
and edx, 0xfffffffc
sub edi, edx
add ebx, edi
sub ecx, edi
and ebx, 0xfffffffc
cmp ebx, 4
jb 0x1000353a
mov dword [ebp - 0x314], eax
and ebx, 0xfffffffc
xor edi, edi
mov eax, dword [ecx + edi]
mov dword [edx + edi], eax
add edi, 4
cmp edi, ebx
jb 0x100035e2
mov eax, dword [ebp - 0x314]
jmp 0x1000353a
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcslen]
cmp eax, 0xff
ja 0x10003457
mov eax, dword [ebp - 0x2fc]
mov dword [esp + 4], ebx
mov eax, dword [eax + 0x20]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscpy]
jmp 0x10003457
movzx edx, word [esi + ebx - 2]
mov word [edi + ebx - 2], dx
jmp 0x1000353a
mov dword [ebp - 0x2f8], 0
mov eax, dword [ebp - 0x2f8]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [sym.imp.kernel32.dll_HeapAlloc]
lea esi, [ebp - 0x2ee]
mov dword [ebp - 0x300], eax
cmp dword [ebp - 0x30c], esi
je 0x100031f3
jmp 0x1000357c
mov dword [ebp - 0x2f8], 8
mov edi, dword [ebp - 0x30c]
lea eax, [ebp - 0x2ee]
cmp edi, eax
je 0x100033d5
mov dword [esp + 8], edi
mov dword [esp + 4], 0
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_HeapFree]
sub esp, 0xc
jmp 0x100033d5
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
mov dword [ebp - 0x2f8], 8
jmp 0x100033d5
mov edi, dword [ebp - 0x30c]
jmp 0x10003690