Function at 0x4012a0
Capabilities:
Execute anti-debugging instructions
Get common file path
Get disk information
Get session user name
Query environment variable
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x415ca0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2f8
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0x64
push ebx
movlpd qword [ebp - 0x68], xmm0
mov eax, dword [ebp - 0x64]
push esi
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x68]
push edi
mov dword [ebp - 0x54], eax
nop dword [eax]
rdtsc
mov dword [ebp - 0x58], eax
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x14], edx
push ebx
cpuid
mov esi, ebx
pop ebx
lea edi, [ebp - 0x78]
mov dword [edi], eax
mov eax, edi
mov dword [eax + 4], esi
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
rdtsc
sub eax, dword [ebp - 0x58]
sbb edx, dword [ebp - 0x14]
add dword [ebp - 0x54], eax
adc dword [ebp - 0x50], edx
sub dword [ebp - 0x1c], 1
jne 0x4012e0
push 0x110
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0xf
mov byte [ebp - 0x4c], 0
call fcn.00401d7a
push 0x104
mov esi, eax
mov dword [ebp - 0x3c], 0x104
push 0
push esi
mov dword [ebp - 0x38], 0x10f
call fcn.004031a0
mov byte [esi + 0x104], 0
mov dword [ebp - 0x4c], esi
push 0x4c
lea eax, [ebp - 0xfc]
mov dword [ebp - 4], 0
push 0
push eax
call fcn.004031a0
add esp, 0x1c
lea eax, [ebp - 0xfc]
push eax
call dword [sym.imp.POWRPROF.dll_GetPwrCapabilities]
xor eax, eax
mov word [ebp - 0x8c], 0
xor ecx, ecx
lea edi, [ebp - 0x88]
push ebx
cpuid
mov esi, ebx
pop ebx
mov dword [edi], eax
mov dword [edi + 4], esi
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x94], eax
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x200]
mov dword [ebp - 0x14], 0x101
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
lea ecx, [ebp - 0x200]
mov edx, 0x41b8e5
cmove ecx, edx
push ecx
lea ecx, [ebp - 0xb0]
call fcn.004018f0
cmp dword [ebp - 0x9c], 0x10
lea eax, [ebp - 0xb0]
push 0x208
cmovae eax, dword [ebp - 0xb0]
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x304]
push 0
push eax
mov dword [ebp - 0x1c], 0
call fcn.004031a0
add esp, 0xc
lea eax, [ebp - 0x304]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov dx, word [ebp - 0x304]
xor ecx, ecx
mov dword [ebp - 0x60], 0
mov byte [ebp - 0x5c], 0
cmp dx, 0x5c
je 0x401474
nop word [eax + eax]
movzx eax, word [ebp + ecx*2 - 0x302]
mov byte [ebp + ecx - 0x60], dl
inc ecx
mov dl, al
cmp eax, 0x5c
jne 0x401460
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x1c]
mov byte [ebp + ecx - 0x60], 0x5c
push eax
push 0
push 0
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
xor ecx, ecx
lea edi, [ebp - 0x78]
test eax, eax
xorps xmm0, xmm0
mov eax, 0x40000000
cmovne ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], ecx
xor ecx, ecx
push ebx
cpuid
mov esi, ebx
movups xmmword [ebp - 0x78], xmm0
pop ebx
mov dword [edi], eax
lea eax, [ebp - 0x80]
mov dword [edi + 4], esi
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
cmp dword [ebp - 0x78], 0x40000000
push eax
setge byte [ebp - 0xd]
movlpd qword [ebp - 0x80], xmm0
call dword [sym.imp.KERNEL32.dll_GetPhysicallyInstalledSystemMemory]
test eax, eax
je 0x4014ea
mov edi, dword [ebp - 0x80]
mov eax, dword [ebp - 0x7c]
shrd edi, eax, 0x14
jmp 0x4014ec
xor edi, edi
mov eax, 1
xor ecx, ecx
push ebx
cpuid
xorps xmm0, xmm0
mov dword [ebp - 0x14], ebx
movups xmmword [ebp - 0x78], xmm0
pop ebx
lea esi, [ebp - 0x78]
mov dword [esi], eax
lea eax, [ebp - 0x78]
mov esi, dword [ebp - 0x14]
mov dword [eax + 4], esi
mov esi, 5
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x70]
sar eax, 0x1f
mov dword [ebp - 0x14], eax
dec esi
call fcn.004011a0
test edx, edx
jne 0x401538
cmp eax, 0x3e8
jb 0x4015cd
test esi, esi
jne 0x401523
lea edx, [esi + 1]
push dword [ebp - 0x58]
movzx eax, byte [ebp - 0xd]
lea ecx, [ebp - 0x4c]
push dword [ebp - 0x18]
cmp dword [ebp - 0x38], 0x10
push eax
cmovae ecx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x14]
push edi
and eax, 1
push eax
lea eax, [ebp - 0x98]
push eax
movzx eax, byte [ebp - 0xef]
push eax
movzx eax, byte [ebp - 0xf6]
push eax
movzx eax, byte [ebp - 0xf7]
push eax
movzx eax, byte [ebp - 0xf8]
push eax
movzx eax, byte [ebp - 0xf9]
push eax
push edx
push str._u__u__u__u__u__u__s__u__u__u__08X__s
push ecx
call fcn.00401010
mov edx, dword [ebp - 0x9c]
add esp, 0x38
cmp edx, 0x10
jb 0x4015de
mov ecx, dword [ebp - 0xb0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4015d4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401873
jmp 0x4015d4
xor edx, edx
jmp 0x40153f
push edx
push ecx
call fcn.00401daa
add esp, 8
cmp dword [ebp - 0x38], 0x10
lea eax, [ebp - 0x4c]
cmovae eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 0x3c]
mov edx, eax
cmp edx, ecx
ja 0x40160d
cmp dword [ebp - 0x38], 0x10
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x3c], edx
cmovae ecx, dword [ebp - 0x4c]
mov byte [ecx + edx], 0
jmp 0x401650
mov esi, dword [ebp - 0x38]
mov edi, edx
mov eax, esi
sub edi, ecx
sub eax, ecx
cmp edi, eax
ja 0x40163e
cmp esi, 0x10
mov dword [ebp - 0x3c], edx
lea eax, [ebp - 0x4c]
cmovae eax, dword [ebp - 0x4c]
push edi
push 0
lea esi, [eax + ecx]
push esi
call fcn.004031a0
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x401650
push ecx
push edi
mov byte [ebp - 0x18], 0
lea ecx, [ebp - 0x4c]
push dword [ebp - 0x18]
push edi
call fcn.004019e0
cmp dword [ebp - 0x38], 0x10
lea eax, [ebp - 0x4c]
cmovae eax, dword [ebp - 0x4c]
push eax
call fcn.00405683
push 0x110
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0xf
mov byte [ebp - 0x34], 0
call fcn.00401d7a
push 0x104
mov esi, eax
mov dword [ebp - 0x24], 0x104
push 0
push esi
mov dword [ebp - 0x20], 0x10f
call fcn.004031a0
mov byte [esi + 0x104], 0
add esp, 0x14
mov dword [ebp - 0x34], esi
mov byte [ebp - 4], 1
lea eax, [ebp - 0x34]
cmp dword [ebp - 0x20], 0x10
push 0x104
cmovae eax, esi
push eax
push str._APPDATA__
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp dword [ebp - 0x20], 0x10
lea eax, [ebp - 0x34]
cmovae eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 0x24]
mov edx, eax
cmp edx, ecx
ja 0x4016f5
cmp dword [ebp - 0x20], 0x10
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x24], edx
cmovae ecx, dword [ebp - 0x34]
mov byte [ecx + edx], 0
jmp 0x401738
mov esi, dword [ebp - 0x20]
mov edi, edx
mov eax, esi
sub edi, ecx
sub eax, ecx
cmp edi, eax
ja 0x401726
cmp esi, 0x10
mov dword [ebp - 0x24], edx
lea eax, [ebp - 0x34]
cmovae eax, dword [ebp - 0x34]
push edi
push 0
lea esi, [eax + ecx]
push esi
call fcn.004031a0
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x401738
push ecx
push edi
mov byte [ebp - 0x18], 0
lea ecx, [ebp - 0x34]
push dword [ebp - 0x18]
push edi
call fcn.004019e0
cmp dword [ebp - 0x38], 0x10
lea ecx, [ebp - 0x4c]
mov esi, dword [ebp - 0x20]
mov eax, esi
cmovae ecx, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x24]
sub eax, edx
push edi
push ecx
cmp edi, eax
ja 0x401778
lea eax, [edx + edi]
cmp esi, 0x10
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x34]
cmovae eax, dword [ebp - 0x34]
lea esi, [eax + edx]
push esi
call fcn.00404640
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x401788
mov byte [ebp - 0x18], 0
lea ecx, [ebp - 0x34]
push dword [ebp - 0x18]
push edi
call fcn.00401b30
cmp dword [ebp - 0x20], 0x10
lea eax, [ebp - 0x34]
push 0
cmovae eax, dword [ebp - 0x34]
push 0x80
push 2
push 0
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x68], 0x2818
push 0
lea eax, [ebp - 0x68]
mov dword [ebp - 0x64], 0x828291
push eax
push 4
lea eax, [ebp - 0x64]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x50], 0
jne 0x4017e9
cmp dword [ebp - 0x54], 0xc350
mov byte [ebp - 0xd], 0
jb 0x4017ed
mov byte [ebp - 0xd], 1
mov edx, dword [ebp - 0x20]
cmp edx, 0x10
jb 0x40181d
mov ecx, dword [ebp - 0x34]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401813
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401878
push edx
push ecx
call fcn.00401daa
add esp, 8
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0xf
mov byte [ebp - 0x34], 0
cmp edx, 0x10
jb 0x40185f
mov ecx, dword [ebp - 0x4c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401855
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401878
push edx
push ecx
call fcn.00401daa
add esp, 8
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0xd]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.004075e6
call fcn.004075e6
int3