Function at 0x1006fde
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
xor ebx, ebx
cmp dword [reloc.msvcrt.dll___p__commode], ebx
je 0x1007078
push edi
xor eax, eax
cmp dword [reloc.msvcrt.dll___p__commode], ebx
lea edi, [ebp - 0x40]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
je 0x1006dc4
push 0x101ac90
push 0xffffffffffffffff
push 0x10018a8
mov dword [reloc.msvcrt.dll___p__commode], ebx
call fcn.01006d83
lea eax, [ebp - 0x40]
push ebx
mov dword [ebp - 0x14], eax
push 4
lea eax, [ebp - 0x18]
push eax
mov dword [ebp - 0x18], 0xc
mov dword [ebp - 0x10], ebx
call fcn.0100f1fa
test eax, eax
je 0x1007077
push esi
push 0x7530
push dword [0x101b020]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, reloc.msvcrt.dll___p__commode
je 0x100706d
push ebx
mov esi, 0x80
push esi
push 4
lea eax, [ebp - 0x18]
push eax
push 3
push 0xc0000000
push 0x101ae90
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, reloc.msvcrt.dll___p__commode
mov dword [ebp - 8], eax
je 0x100706d
lea ecx, [ebp - 0x20]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov edi, 0x101b068
push edi
push ebx
push ebx
mov dword [ebp - 0x1c], ebx
push 1
mov ebx, 0x800
push ebx
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetDateFormatW]
push 0x20
mov esi, 0x101b028
push esi
push 0x100188c
push 0
push 8
push ebx
call dword [sym.imp.KERNEL32.dll_GetTimeFormatW]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
call ebx
push 0x7f
pop ecx
sub ecx, eax
push ecx
push esi
push edi
call dword [sym.imp.msvcrt.dll_wcsncat]
and word [0x101b166], 0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push 0x1001848
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push edi
call ebx
push 0x7f
pop ecx
sub ecx, eax
push ecx
push esi
push edi
call dword [sym.imp.msvcrt.dll_wcsncat]
and word [0x101b166], 0
add esp, 0xc
push edi
call ebx
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0xc]
push ecx
shl eax, 1
push eax
push edi
push dword [ebp - 8]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 4]
add dword [ebp - 0x24], eax
cmp dword [ebp + 8], 0
je 0x1006f0e
push dword [ebp + 8]
call ebx
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0xc]
push ecx
shl eax, 1
push eax
push dword [ebp + 8]
mov dword [ebp - 4], eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 4]
add dword [ebp - 0x24], eax
cmp dword [ebp + 0xc], reloc.msvcrt.dll___p__commode
je 0x1006f85
mov eax, dword [ebp + 0xc]
and eax, 0x1fff0000
cmp eax, 0x80000
jne 0x1006f28
and word [ebp + 0xe], 0
push 0
push 0x80
push edi
push 0x400
push dword [ebp + 0xc]
push 0
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
jne 0x1006f54
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x100706d
push dword [ebp + 0xc]
and word [eax*2 + 0x101b064], 0
push 0x100183c
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0x1001824
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x1006f8d
and word [0x101b068], 0
push 0x10017fc
push esi
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push esi
call ebx
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0xc]
push ecx
shl eax, 1
push eax
push esi
push dword [ebp - 8]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 4]
add dword [ebp - 0x24], eax
push edi
call ebx
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0xc]
push ecx
shl eax, 1
push eax
push edi
push dword [ebp - 8]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 4], eax
call edi
mov eax, dword [ebp - 4]
add dword [ebp - 0x24], eax
cmp dword [ebp + 0x10], 0
je 0x1007031
push 0x10017d4
push esi
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push esi
call ebx
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0xc]
push ecx
shl eax, 1
push eax
push esi
push dword [ebp - 8]
mov dword [ebp - 4], eax
call edi
mov eax, dword [ebp - 4]
push dword [ebp + 0x10]
add dword [ebp - 0x24], eax
call ebx
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0xc]
push ecx
shl eax, 1
push eax
push dword [ebp + 0x10]
mov dword [ebp - 4], eax
push dword [ebp - 8]
call edi
mov eax, dword [ebp - 4]
add dword [ebp - 0x24], eax
push 0x10017cc
push esi
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push esi
call ebx
mov ebx, eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0xc]
push eax
shl ebx, 1
push ebx
push esi
push dword [ebp - 8]
call edi
push dword [ebp - 8]
add dword [ebp - 0x24], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [0x101b020]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea eax, [ebp - 0x18]
push eax
call fcn.0100f3f6
pop esi
pop edi
pop ebx
leave
ret 0xc