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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x438
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push edi
lea eax, [ebp - 0xc]
push eax
push 0x20019
xor ebx, ebx
push ebx
push 0x1001b90
mov edi, 0x80000002
push edi
mov dword [ebp - 8], ebx
call esi
test eax, eax
jne 0x1003436
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push 0x1001b6c
push dword [ebp - 0xc]
mov dword [ebp - 0x10], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 8], ebx
je 0x1003436
lea eax, [ebp - 0xc]
push eax
push 0x20019
push ebx
push 0x1001b18
push edi
call esi
test eax, eax
jne 0x1003433
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push 0x1001af8
push dword [ebp - 0xc]
mov dword [ebp - 0x10], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1003425
cmp word [ebp - 0x234], bx
jne 0x1003428
mov dword [ebp - 8], ebx
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1003436
mov dword [ebp - 8], ebx
call fcn.010026ac
test eax, eax
je 0x1003714
call fcn.01002d59
test eax, eax
je 0x100346c
xor edi, edi
inc edi
push edi
push edi
push ebx
push ebx
mov esi, 0x1001ae4
push esi
call fcn.0100250a
test eax, eax
jne 0x100346c
push edi
push edi
push edi
push ebx
push esi
call fcn.0100250a
cmp dword [ebp - 8], ebx
je 0x100348f
push 3
push ebx
push ebx
push ebx
lea eax, [ebp - 0x234]
push eax
call fcn.010022ab
test eax, eax
je 0x10036f2
jmp 0x10036de
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
cmp dword [eax + 0x1d4], ebx
je 0x10036f2
push 0x1001acc
mov byte [ebp - 2], 1
mov byte [ebp - 1], bl
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, ebx
mov dword [ebp - 0x24], eax
je 0x10036f2
mov esi, 0xa68
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
cmp edi, ebx
mov dword [ebp - 0x1c], edi
je 0x10036e9
push 0x1001ab0
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x10036e2
lea ecx, [ebp - 0x28]
push ecx
push esi
push edi
push 1
push 0xffffffffffffffff
push ebx
call eax
test al, al
je 0x10036e2
lea esi, [edi + 0x2f2]
cmp word [esi], bx
je 0x10036e2
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x104
lea eax, [ebp - 0x234]
push eax
push esi
call edi
test eax, eax
jne 0x1003542
lea eax, [ebp - 0x234]
push esi
push eax
call dword [sym.imp.ntdll.dll_wcscpy]
pop ecx
pop ecx
mov esi, dword [ebp - 0x1c]
add esi, 0xf0
cmp word [esi], bx
je 0x1003583
push 0x101
lea eax, [ebp - 0x438]
push eax
push esi
call edi
test eax, eax
jne 0x1003573
lea eax, [ebp - 0x438]
push esi
push eax
call dword [sym.imp.ntdll.dll_wcscpy]
pop ecx
pop ecx
lea eax, [ebp - 0x438]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov byte [ebp - 2], al
cmp byte [ebp - 2], bl
mov dword [ebp - 0x20], esi
jne 0x10035ae
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push dword [eax + 0x1d4]
push esi
push 0x1001a70
call sub.ntdll.dll_DbgPrint
add esp, 0xc
mov byte [ebp - 1], 1
jmp 0x10035e4
mov eax, dword [ebp - 0x1c]
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 - 0x234]
push eax
call fcn.010022ab
cmp al, bl
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x20], ecx
jne 0x10036cc
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push 1
lea ecx, [ebp - 0x14]
push ecx
push ebx
push eax
push ebx
push 0x11ff
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
lea ecx, [ebp - 0x438]
push 0x100
xor eax, eax
cmp dword [ebp - 0x14], ebx
push ecx
je 0x1003666
cmp byte [ebp - 1], 1
setne al
add eax, 0x643
push eax
push ebx
call dword [sym.imp.USER32.dll_LoadStringW]
mov edi, eax
cmp edi, ebx
je 0x100365b
push 0x400
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, ebx
je 0x100365b
push dword [ebp - 0x20]
lea eax, [ebp - 0x438]
push dword [ebp - 0x14]
push eax
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x10036aa
cmp byte [ebp - 1], 1
setne al
add eax, 0x645
push eax
push ebx
call dword [sym.imp.USER32.dll_LoadStringW]
mov edi, eax
cmp edi, ebx
je 0x10036cc
push 0x400
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, ebx
je 0x10036aa
push dword [ebp - 0x20]
lea eax, [ebp - 0x438]
push dword [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
cmp edi, ebx
je 0x10036cc
cmp esi, ebx
je 0x10036cc
push 0x1001a10
push 0x4010
push ebx
push esi
push ebx
push ebx
call fcn.01003b5c
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x1003717
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebx
push ebx
push ebx
push ebx
mov esi, 0x1001a04
push esi
call fcn.0100250a
test eax, eax
jne 0x1003714
push ebx
push ebx
push 1
push 0x10012d4
push esi
call fcn.0100250a
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret