Function at 0x100348d
Capabilities:
Print debug messages
Query environment variable
Query or enumerate registry value
Set current directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x43c
mov eax, dword [0x10060f0]
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push edi
mov dword [ebp - 4], eax
lea eax, [ebp - 0x418]
push eax
push 0x20019
xor ebx, ebx
push ebx
push 0x1001b28
mov edi, 0x80000002
push edi
mov dword [ebp - 0x41c], ebx
call esi
test eax, eax
jne 0x1003589
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x428]
push eax
push ebx
push 0x1001b04
push dword [ebp - 0x418]
mov dword [ebp - 0x420], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x41c], ebx
je 0x1003589
lea eax, [ebp - 0x418]
push eax
push 0x20019
push ebx
push 0x1001ab0
push edi
call esi
test eax, eax
jne 0x1003583
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x428]
push eax
push ebx
push 0x1001a90
push dword [ebp - 0x418]
mov dword [ebp - 0x420], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x100356f
cmp word [ebp - 0x20c], bx
jne 0x1003575
mov dword [ebp - 0x41c], ebx
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1003589
mov dword [ebp - 0x41c], ebx
call fcn.010028f1
test eax, eax
je 0x10038bb
call fcn.010030ac
test eax, eax
je 0x10035bf
xor edi, edi
inc edi
push edi
push edi
push ebx
push ebx
mov esi, 0x1001a7c
push esi
call fcn.0100273c
test eax, eax
jne 0x10035bf
push edi
push edi
push edi
push ebx
push esi
call fcn.0100273c
cmp dword [ebp - 0x41c], ebx
je 0x10035e5
push 3
push ebx
push ebx
push ebx
lea eax, [ebp - 0x20c]
push eax
call fcn.01002454
test eax, eax
je 0x1003899
jmp 0x1003882
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
cmp dword [eax + 0x1d4], ebx
je 0x1003899
push 0x1001a64
mov byte [ebp - 0x412], 1
mov byte [ebp - 0x411], bl
mov dword [ebp - 0x424], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, ebx
mov dword [ebp - 0x434], eax
je 0x1003899
mov esi, 0xa68
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
cmp edi, ebx
mov dword [ebp - 0x42c], edi
je 0x100388d
push 0x1001a48
push dword [ebp - 0x434]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x1003886
lea ecx, [ebp - 0x438]
push ecx
push esi
push edi
push 1
push 0xffffffffffffffff
push ebx
call eax
test al, al
je 0x1003886
lea esi, [edi + 0x2f2]
cmp word [esi], bx
je 0x1003886
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x104
lea eax, [ebp - 0x20c]
push eax
push esi
call edi
test eax, eax
jne 0x10036ad
lea eax, [ebp - 0x20c]
push esi
push eax
call dword [sym.imp.ntdll.dll_wcscpy]
pop ecx
pop ecx
mov esi, dword [ebp - 0x42c]
add esi, 0xf0
cmp word [esi], bx
je 0x10036f4
push 0x101
lea eax, [ebp - 0x410]
push eax
push esi
call edi
test eax, eax
jne 0x10036e1
lea eax, [ebp - 0x410]
push esi
push eax
call dword [sym.imp.ntdll.dll_wcscpy]
pop ecx
pop ecx
lea eax, [ebp - 0x410]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov byte [ebp - 0x412], al
cmp byte [ebp - 0x412], bl
mov dword [ebp - 0x430], esi
jne 0x1003728
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push dword [eax + 0x1d4]
push esi
push 0x1001a08
call sub.ntdll.dll_DbgPrint
add esp, 0xc
mov byte [ebp - 0x411], 1
jmp 0x1003764
mov eax, dword [ebp - 0x42c]
mov eax, dword [eax + 0x7c]
and eax, 0x8000000
neg eax
sbb eax, eax
and eax, 0xfffffffe
add eax, 5
push eax
push ebx
push ebx
push ebx
lea eax, [ebp - 0x20c]
push eax
call fcn.01002454
cmp al, bl
lea ecx, [ebp - 0x20c]
mov dword [ebp - 0x430], ecx
jne 0x100386a
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push 1
lea ecx, [ebp - 0x424]
push ecx
push ebx
push eax
push ebx
push 0x11ff
mov dword [ebp - 0x43c], eax
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
lea ecx, [ebp - 0x410]
push 0x100
xor eax, eax
cmp dword [ebp - 0x424], ebx
push ecx
je 0x10037fb
cmp byte [ebp - 0x411], 1
setne al
add eax, 0x643
push eax
push ebx
call dword [sym.imp.USER32.dll_LoadStringW]
mov edi, eax
cmp edi, ebx
je 0x10037ed
push 0x400
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, ebx
je 0x10037ed
push dword [ebp - 0x430]
lea eax, [ebp - 0x410]
push dword [ebp - 0x424]
push eax
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push dword [ebp - 0x424]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1003848
cmp byte [ebp - 0x411], 1
setne al
add eax, 0x645
push eax
push ebx
call dword [sym.imp.USER32.dll_LoadStringW]
mov edi, eax
cmp edi, ebx
je 0x100386a
push 0x400
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, ebx
je 0x1003848
push dword [ebp - 0x430]
lea eax, [ebp - 0x410]
push dword [ebp - 0x43c]
push eax
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
cmp edi, ebx
je 0x100386a
cmp esi, ebx
je 0x100386a
push 0x10019a8
push 0x4010
push ebx
push esi
push ebx
push ebx
call fcn.01004130
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x42c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x434]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x10038be
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x434]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebx
push ebx
push ebx
push ebx
mov esi, 0x100199c
push esi
call fcn.0100273c
test eax, eax
jne 0x10038bb
push ebx
push ebx
push 1
push 0x10012e4
push esi
call fcn.0100273c
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01004e6a
leave
ret