Function at 0x10002038
Capabilities:
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x20bc
call sub.ntdll.dll__chkstk
push ebx
push esi
xor esi, esi
lea edx, [esp + 0x634]
push edi
inc esi
xor bh, bh
call fcn.10004fce
test al, al
je 0x100022e6
call fcn.10005157
mov bl, al
test bl, bl
je 0x10002076
push 0xe
jmp 0x1000233a
lea ecx, [esp + 0x1aa8]
call fcn.100044cc
lea ecx, [esp + 0x1688]
mov byte [esp + 0xe], al
call fcn.100046c3
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, 0x104
mov byte [esp + 0x14], al
lea eax, [esp + 0x1898]
push edi
push eax
push str._LOCALAPPDATA__PRODUCTNAME_Bin
call esi
dec eax
cmp eax, 0x102
jbe 0x100020c1
push 0x1d
pop esi
jmp 0x100022ca
lea eax, [esp + 0x126c]
push eax
lea eax, [esp + 0x189c]
push eax
push str._s_s.dll
lea eax, [esp + 0x434]
push edi
push eax
call dword [sym.imp.ntdll.dll__snwprintf]
add esp, 0x14
cmp dword [esp + 0x1268], 0
jne 0x1000210e
mov dl, byte [esp + 0xe]
push ecx
push 0
push 3
push dword [esp + 0x20]
lea ecx, [esp + 0x648]
call fcn.10001943
add esp, 0x10
call fcn.100049d0
push ecx
lea ecx, [esp + 0x63c]
call fcn.10001f31
cmp byte [esp + 0x18], 0
pop ecx
mov byte [esp + 0xf], al
je 0x10002141
lea edx, [esp + 0x1688]
lea ecx, [esp + 0x638]
call fcn.10001fac
mov bh, al
push edi
lea eax, [esp + 0x147c]
push eax
push str._LOCALAPPDATA__PRODUCTNAME_Bin_f.dat
call esi
dec eax
cmp eax, 0x102
ja 0x10002180
xor eax, eax
push eax
push eax
push 2
push eax
push eax
push 0x1f01ff
lea eax, [esp + 0x1490]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x10002180
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x1cb8]
push eax
lea eax, [esp + 0x224]
push eax
lea eax, [esp + 0x20]
push eax
lea edx, [esp + 0x434]
lea ecx, [esp + 0x644]
call fcn.1000346b
add esp, 0xc
test al, al
jne 0x100021b6
push 0x12
jmp 0x100022b8
lea eax, [esp + 0x638]
push eax
lea eax, [esp + 0x1cbc]
push eax
lea edx, [esp + 0x430]
lea ecx, [esp + 0x20]
call fcn.10001dd2
pop ecx
pop ecx
test al, al
jne 0x100021e3
push 6
jmp 0x100022b8
and dword [esp + 0x10], 0
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x63c]
push 1
push eax
lea edx, [esp + 0x22c]
lea ecx, [esp + 0x24]
call fcn.1000383c
add esp, 0xc
test al, al
jne 0x100022ed
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x63c]
push 0
push eax
lea edx, [esp + 0x22c]
lea ecx, [esp + 0x24]
call fcn.1000383c
add esp, 0xc
test al, al
jne 0x100022ed
call fcn.10004716
test al, al
jne 0x1000225b
push dword [esp + 0x10]
push ecx
push 0xd
pop edx
lea ecx, [esp + 0x640]
call fcn.10001a1a
pop ecx
pop ecx
and dword [esp + 0x10], 0
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x63c]
push eax
lea edx, [esp + 0x228]
lea ecx, [esp + 0x20]
call fcn.100034d0
pop ecx
pop ecx
test al, al
jne 0x100022ed
push dword [esp + 0x10]
push ecx
push 9
pop edx
lea ecx, [esp + 0x640]
call fcn.10001a1a
lea eax, [esp + 0x640]
push eax
lea edx, [esp + 0x22c]
lea ecx, [esp + 0x24]
call fcn.100033b6
add esp, 0xc
test al, al
jne 0x100022ed
push 0x13
pop esi
lea edx, [esp + 0x638]
call fcn.10003e9f
cmp esi, 0x33
je 0x100022e6
push 0x10006800
push 1
push esi
mov edx, 0xc8
lea ecx, [esp + 0x644]
call fcn.1000182e
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp dword [esp + 0x1268], 0
jne 0x10002338
cmp byte [esp + 0x14], 0
je 0x10002307
mov byte [esp + 0x14], 1
test bh, bh
jne 0x1000230c
mov byte [esp + 0x14], 0
cmp byte [esp + 0xe], 0
je 0x1000231e
cmp byte [esp + 0xf], 0
je 0x1000231e
mov dl, 1
jmp 0x10002320
xor dl, dl
push ecx
push 0
push 4
push dword [esp + 0x20]
lea ecx, [esp + 0x648]
call fcn.10001943
add esp, 0x10
push 0x33
pop esi
test bl, bl
je 0x100022c5
push ecx
push 0
push 0xb
push 0
xor dl, dl
lea ecx, [esp + 0x648]
call fcn.10001943
add esp, 0x10
jmp 0x100022e6