Function at 0x401000
Capabilities:
Authenticate hmac
Encode data using xor
Get common file path
Write file on windows

Disassembly:
sub esp, 0x430
mov eax, dword [0x425030]
xor eax, esp
mov dword [esp + 0x42c], eax
push ebx
push ebp
push esi
push edi
xor edi, edi
push 0x208
mov esi, ecx
lea ecx, [esp + 0x236]
mov ebx, edx
xor eax, eax
push edi
push ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], 0x33221122
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov word [esp + 0x23c], ax
call fcn.004122f0
mov edx, 0x38
mov word [esp + 0x30], dx
mov eax, 0x33
mov word [esp + 0x32], ax
mov word [esp + 0x38], ax
mov ecx, 0x36
mov word [esp + 0x34], cx
mov word [esp + 0x3a], cx
mov edx, 0x39
mov word [esp + 0x36], dx
mov eax, 0x39
mov ecx, eax
mov edx, 0x38
mov word [esp + 0x3c], dx
mov word [esp + 0x3e], ax
mov word [esp + 0x40], cx
mov edx, 0x36
mov word [esp + 0x42], dx
mov ecx, 0x38
mov edx, ecx
mov eax, 0x37
mov word [esp + 0x44], ax
mov word [esp + 0x46], cx
mov word [esp + 0x48], dx
mov eax, 0x36
mov word [esp + 0x4a], ax
mov ecx, 0x30
mov edx, 0x34
mov word [esp + 0x4c], cx
mov ecx, edx
mov eax, 0x32
mov word [esp + 0x4e], dx
mov edx, eax
push 0x1e0
mov word [esp + 0x58], dx
mov word [esp + 0x54], ax
mov word [esp + 0x56], cx
lea edx, [esp + 0x5e]
mov eax, 0x37
xor ecx, ecx
push edi
push edx
mov word [esp + 0x62], ax
mov word [esp + 0x64], cx
call fcn.004122f0
add esp, 0x18
cmp esi, 5
je 0x401129
cmp esi, 0x2a
jne 0x401308
cmp dword [ebx], 2
ja 0x401308
lea eax, [esp + 0x230]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x401308
push esi
lea ecx, [esp + 0x28]
push ecx
mov edx, ecx
push 0x420cfc
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [esp + 0x240]
add esp, 0x10
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x401170
sub eax, edx
sar eax, 1
mov edx, eax
cmp word [esp + edx*2 + 0x22e], 0x5c
je 0x4011a3
mov eax, 0x5c
xor ecx, ecx
mov word [esp + edx*2 + 0x22e], ax
mov word [esp + edx*2 + 0x230], cx
lea eax, [esp + 0x24]
lea esi, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4011b0
sub eax, esi
sar eax, 1
push eax
lea eax, [esp + 0x28]
push eax
mov ecx, 0x104
sub ecx, edx
push ecx
lea edx, [esp + 0x23c]
push edx
call fcn.0040f726
push 0xb1
mov esi, 0xb0
call fcn.0040f82f
mov ebp, eax
add esp, 0x14
cmp ebp, edi
je 0x40130c
mov eax, dword [ebx]
lea eax, [eax + eax*4 + 0x10]
mov dword [ebp], eax
pushal
rdtsc
mov dword [esp + 0x30], eax
popal
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
mov dword [ebp + 4], ecx
mov edx, dword [edi]
lea esi, [ebp + 8]
mov dword [esi], edx
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov eax, dword [edi]
lea ecx, [eax + eax*4]
push ecx
lea edx, [edi + 8]
push edx
lea eax, [ebp + 0x10]
push eax
call fcn.00412aa0
add esp, 0xc
mov dword [esp + 0x14], 0x33446699
xor eax, eax
nop
mov ecx, eax
and ecx, 3
mov dl, byte [esp + ecx + 0x14]
xor dl, byte [esp + eax + 0x10]
inc eax
mov byte [esp + eax + 0x1f], dl
cmp eax, 4
jb 0x401240
mov edi, dword [edi]
lea ecx, [edi + edi*4 + 8]
test esi, esi
je 0x4012e9
test ecx, ecx
je 0x4012e9
xor eax, eax
test ecx, ecx
jbe 0x401284
mov edx, eax
and edx, 3
mov dl, byte [esp + edx + 0x20]
xor byte [eax + esi], dl
inc eax
cmp eax, ecx
jb 0x401273
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
lea eax, [esp + 0x248]
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x4012d3
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
lea ecx, [esp + 0x248]
push ecx
call edi
mov dword [esp + 0x18], eax
cmp eax, esi
je 0x4012e9
mov esi, eax
push 0
lea edx, [esp + 0x20]
push edx
push 0xb0
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x4012ed
mov esi, dword [esp + 0x18]
push ebp
call fcn.0040f71b
add esp, 4
test esi, esi
je 0x401301
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xb0
jmp 0x40130e
mov eax, edi
jmp 0x40130e
mov eax, esi
mov ecx, dword [esp + 0x43c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040f70c
add esp, 0x430
ret