Function at 0x409ca0
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea eax, [ebp - 0x1c]
sub esp, 0x4c
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._CommandLineToArgvW_8
sub esp, 8
test eax, eax
je 0x40a040
mov esi, eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
dec eax
je 0x40a04a
mov dword [ebp - 0x30], 0
mov ebx, 1
jle 0x409e60
mov esi, esi
lea edi, [edi]
mov edi, dword [esi + ebx*4]
movzx ecx, word [edi]
mov eax, ecx
and eax, 0xfffd
cmp eax, 0x2d
jne 0x409de0
movzx eax, word [edi + 2]
test eax, eax
jne 0x409dc0
cmp ecx, 0x2d
je 0x409de0
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_towupper]
sub ax, 0x3f
cmp ax, 0x17
movzx ecx, ax
ja case.0x409d31.64
jmp dword [ecx*4 + 0x412a0c]
mov dword [esp + 4], edi
mov dword [esp], 0xbba
call sym._output_message
mov dword [esp], 0xbbb
call sym._error_exit
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
inc ebx
cmp ebx, dword [ebp - 0x2c]
jl 0x409cf0
jne 0x409e60
cmp dword [ebp - 0x30], 2
jne 0x40a02c
mov dword [esp], 0xbbd
call sym._output_message
mov dword [esp], 0xbbb
call sym._error_exit
mov eax, dword [ebp - 0x1c]
jmp 0x409de3
mov dword [esp], 0xbb9
call sym._error_exit
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
jmp case.0x409d31.67
mov dword [ebp - 0x30], 1
jmp case.0x409d31.67
movzx ecx, word [edi + 4]
cmp ecx, 0x3a
je 0x409d1b
test ecx, ecx
je 0x409d1b
lea esi, [esi]
lea edi, [edi]
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
jle 0x409e60
mov edi, dword [ebp - 0x30]
mov ecx, ebx
jmp 0x409dff
mov dword [esp], edx
call sym._delete_registry_key
mov ecx, ebx
cmp ecx, dword [ebp - 0x1c]
jge 0x409e60
lea eax, [ecx*4]
cmp edi, 1
mov edx, dword [esi + eax]
lea ebx, [ecx + 1]
je 0x409e90
cmp edi, 2
je 0x409df0
mov dword [esp], edx
mov eax, 0x4129f2
mov dword [esp + 4], eax
mov dword [ebp - 0x2c], edx
call dword [sym.imp.kernel32.dll_lstrcmpW]
mov edx, dword [ebp - 0x2c]
sub esp, 8
test eax, eax
jne 0x409ed0
mov dword [esp], 0
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov dword [esp], eax
call sym._import_registry_file
mov ecx, ebx
cmp ecx, dword [ebp - 0x1c]
jl 0x409dff
lea esi, [esi]
lea edi, [edi]
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_LocalFree]
mov eax, 1
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x30], 2
jmp case.0x409d31.67
mov eax, dword [esi + eax + 4]
add ecx, 2
test eax, eax
je 0x409ea5
cmp word [eax], 0
jne 0x409fd0
mov dword [ebp - 0x2c], ecx
mov eax, 1
xor ecx, ecx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov dword [esp], edx
call sym._export_registry_key
mov ecx, dword [ebp - 0x2c]
jmp 0x409dfa
mov dword [esp + 4], edx
xor eax, eax
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov dword [esp], 0
mov dword [ebp - 0x30], edx
call dword [sym.imp.kernel32.dll_SearchPathW]
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x2c], 0
sub esp, 0x18
test eax, eax
mov ecx, eax
jle 0x409f59
mov dword [ebp - 0x34], edx
lea eax, [eax + eax]
mov dword [esp], eax
mov dword [ebp - 0x30], ecx
call sym._heap_xalloc
mov ecx, dword [ebp - 0x30]
xor edx, edx
mov dword [esp + 0x14], edx
mov edx, dword [ebp - 0x34]
mov dword [esp], 0
mov dword [esp + 0xc], ecx
xor ecx, ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp + 0x10], eax
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], eax
call dword [sym.imp.kernel32.dll_SearchPathW]
mov edx, dword [ebp - 0x30]
sub esp, 0x18
mov ecx, eax
test ecx, ecx
je 0x409ff0
mov dword [ebp - 0x30], edx
mov eax, 0x4129f6
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wfopen]
test eax, eax
je 0x40a064
mov dword [esp], eax
mov dword [ebp - 0x30], eax
call sym._import_registry_file
mov edx, dword [ebp - 0x2c]
test edx, edx
je 0x40a05d
mov dword [esp + 8], edx
xor edx, edx
mov dword [esp + 4], 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_HeapFree]
mov ecx, dword [ebp - 0x30]
sub esp, 0xc
mov dword [esp], ecx
call dword [sym.imp.ucrtbase.dll_fclose]
mov ecx, ebx
jmp 0x409dfa
mov dword [esp + 4], eax
mov ebx, 1
mov dword [esp + 8], ebx
mov dword [esp], edx
mov dword [ebp - 0x2c], ecx
call sym._export_registry_key
mov ecx, dword [ebp - 0x2c]
jmp 0x409dfa
mov dword [esp + 4], edx
mov dword [esp], 0xbbe
call sym._output_message
mov edx, dword [ebp - 0x2c]
xor ecx, ecx
mov dword [esp + 4], ecx
mov eax, dword fs:[0x18]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov ecx, ebx
sub esp, 0xc
jmp 0x409dfa
mov dword [esp], 0xbbc
call sym._output_message
jmp 0x409d84
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_LocalFree]
xor eax, eax
sub esp, 4
jmp 0x409e71
mov ecx, ebx
jmp 0x409dfa
mov dword [esp], 0x4129fc
call dword [sym.imp.ucrtbase.dll__wperror]
mov edx, dword [ebp - 0x30]
mov dword [esp], 0xbbf
mov dword [esp + 4], edx
jmp 0x409ffb