Function at 0x402170
Capabilities:
Delete file
Extract resource via kernel32 functions
Get common file path
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x474035
mov eax, dword fs:[0]
push eax
sub esp, 0x428
mov eax, dword [0x49804c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x404], ecx
mov dword [ebp - 0x1ac], 0
push 0x479a20
lea ecx, [ebp - 0x16c]
call fcn.00404010
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x1a8]
call fcn.004357bc
mov byte [ebp - 4], 1
push 0x104
lea eax, [ebp - 0x3bc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea ecx, [ebp - 0x3bc]
push ecx
lea ecx, [ebp - 0x16c]
call fcn.004040d0
push 0
push str..asf.tmp
lea edx, [ebp - 0x16c]
push edx
lea eax, [ebp - 0x3d0]
push eax
call fcn.004035f0
add esp, 0xc
mov dword [ebp - 0x408], eax
mov ecx, dword [ebp - 0x408]
mov dword [ebp - 0x40c], ecx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x40c]
call fcn.00428a50
push eax
lea ecx, [ebp - 0x1a8]
call fcn.0043584a
mov dword [ebp - 0x190], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x3d0]
call fcn.00404090
cmp dword [ebp - 0x190], 1
jne 0x402328
lea ecx, [ebp - 0x1a8]
call fcn.004354ba
mov dword [ebp - 0x190], eax
lea edx, [ebp - 0x3d4]
push edx
lea ecx, [ebp - 0x1a8]
call fcn.00435b36
mov dword [ebp - 0x410], eax
mov eax, dword [ebp - 0x410]
mov dword [ebp - 0x414], eax
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x414]
push ecx
push 0x479a3c
lea edx, [ebp - 0x16c]
push edx
lea eax, [ebp - 0x3d8]
push eax
call fcn.004035f0
add esp, 0xc
mov dword [ebp - 0x418], eax
mov ecx, dword [ebp - 0x418]
mov dword [ebp - 0x41c], ecx
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x41c]
push edx
lea eax, [ebp - 0x3c0]
push eax
call fcn.00403540
add esp, 0xc
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x3d8]
call fcn.00404090
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x3d4]
call fcn.00404090
lea ecx, [ebp - 0x3c0]
call fcn.00428a50
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x3c0]
call fcn.00404090
jmp 0x402254
push 0x479a40
push 0x4e20
mov ecx, dword [ebp - 0x404]
mov edx, dword [ecx + 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x18c], eax
cmp dword [ebp - 0x18c], 0
jne 0x402387
mov dword [ebp - 0x3dc], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1a8]
call fcn.004357e2
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x16c]
call fcn.00404090
mov eax, dword [ebp - 0x3dc]
jmp 0x40293d
mov eax, dword [ebp - 0x18c]
push eax
mov ecx, dword [ebp - 0x404]
mov edx, dword [ecx + 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x184], eax
cmp dword [ebp - 0x184], 0
jne 0x4023e3
mov dword [ebp - 0x3e0], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1a8]
call fcn.004357e2
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x16c]
call fcn.00404090
mov eax, dword [ebp - 0x3e0]
jmp 0x40293d
mov eax, dword [ebp - 0x184]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x188], eax
cmp dword [ebp - 0x188], 0
jne 0x402442
mov ecx, dword [ebp - 0x184]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov dword [ebp - 0x3e4], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1a8]
call fcn.004357e2
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x16c]
call fcn.00404090
mov eax, dword [ebp - 0x3e4]
jmp 0x40293d
mov edx, dword [ebp - 0x18c]
push edx
mov eax, dword [ebp - 0x404]
mov ecx, dword [eax + 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x120], eax
lea edx, [ebp - 0x174]
push edx
call fcn.00403da0
push str._Y__m__d_H_M_S
lea eax, [ebp - 0x1b0]
push eax
lea ecx, [ebp - 0x174]
call fcn.00403dc0
mov byte [ebp - 4], 5
push str..asf.temp
lea ecx, [ebp - 0x1b0]
push ecx
push 0x479a88
lea edx, [ebp - 0x16c]
push edx
lea eax, [ebp - 0x3e8]
push eax
call fcn.004035f0
add esp, 0xc
mov dword [ebp - 0x420], eax
mov ecx, dword [ebp - 0x420]
mov dword [ebp - 0x424], ecx
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x424]
push edx
lea eax, [ebp - 0x3ec]
push eax
call fcn.00403540
add esp, 0xc
mov dword [ebp - 0x428], eax
mov ecx, dword [ebp - 0x428]
mov dword [ebp - 0x42c], ecx
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x42c]
push edx
lea eax, [ebp - 0x3f0]
push eax
call fcn.004035f0
add esp, 0xc
mov dword [ebp - 0x430], eax
mov ecx, dword [ebp - 0x430]
mov dword [ebp - 0x434], ecx
mov byte [ebp - 4], 8
mov edx, dword [ebp - 0x434]
push edx
mov ecx, dword [ebp - 0x404]
add ecx, 0x2c5
call fcn.004040b0
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x3f0]
call fcn.00404090
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x3ec]
call fcn.00404090
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x3e8]
call fcn.00404090
lea ecx, [ebp - 0xd]
call fcn.0040cc10
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x11c]
call fcn.0040b730
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x120]
push eax
lea ecx, [ebp - 0x11c]
call fcn.0040b770
lea ecx, [ebp - 0x168]
call fcn.0040b7d0
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x120]
push ecx
mov edx, dword [ebp - 0x188]
push edx
lea ecx, [ebp - 0x168]
call fcn.0040b890
mov eax, dword [ebp - 0x120]
push eax
mov ecx, dword [ebp - 0x188]
push ecx
lea edx, [ebp - 0x11c]
push edx
lea ecx, [ebp - 0xd]
call fcn.0040ce20
push 2
mov ecx, dword [ebp - 0x404]
add ecx, 0x2c5
call fcn.00428a50
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [ebp - 0x184]
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov dword [ebp - 0x180], str.3AD5D636187ECFEE305ACD8CEA1585A8
lea ecx, [ebp - 0x168]
call fcn.0040b8c0
mov dword [ebp - 0x17c], eax
mov ecx, dword [ebp - 0x17c]
push ecx
mov edx, dword [ebp - 0x180]
push edx
call fcn.0045bf80
add esp, 8
test eax, eax
je 0x40269d
mov dword [ebp - 0x3f4], 0
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x168]
call fcn.0040b800
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x11c]
call fcn.0040b760
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xd]
call fcn.0040cc20
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1b0]
call fcn.00404090
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1a8]
call fcn.004357e2
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x16c]
call fcn.00404090
mov eax, dword [ebp - 0x3f4]
jmp 0x40293d
lea ecx, [ebp - 0x130]
call fcn.00434345
mov byte [ebp - 4], 0xc
push 0
push 0x9001
mov ecx, dword [ebp - 0x404]
add ecx, 0x2c5
call fcn.00428a50
push eax
lea ecx, [ebp - 0x130]
call fcn.004348fa
mov dword [ebp - 0x178], eax
cmp dword [ebp - 0x178], 0
jne 0x40275d
mov dword [ebp - 0x3f8], 0
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x130]
call fcn.00434505
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x168]
call fcn.0040b800
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x11c]
call fcn.0040b760
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xd]
call fcn.0040cc20
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1b0]
call fcn.00404090
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1a8]
call fcn.004357e2
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x16c]
call fcn.00404090
mov eax, dword [ebp - 0x3f8]
jmp 0x40293d
mov eax, dword [ebp - 0x120]
push eax
mov ecx, dword [ebp - 0x188]
push ecx
lea ecx, [ebp - 0x130]
call fcn.00434093
lea ecx, [ebp - 0x130]
call fcn.004342e3
mov ecx, dword [ebp - 0x404]
add ecx, 0x2c5
call fcn.00428a50
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edx, dword [ebp - 0x404]
mov dword [edx + 0x2cd], eax
mov eax, dword [ebp - 0x404]
cmp dword [eax + 0x2cd], 0
jne 0x402832
mov dword [ebp - 0x3fc], 0
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x130]
call fcn.00434505
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x168]
call fcn.0040b800
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x11c]
call fcn.0040b760
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xd]
call fcn.0040cc20
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1b0]
call fcn.00404090
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1a8]
call fcn.004357e2
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x16c]
call fcn.00404090
mov eax, dword [ebp - 0x3fc]
jmp 0x40293d
push 0x479ab0
mov ecx, dword [ebp - 0x404]
mov edx, dword [ecx + 0x2cd]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1ac], eax
cmp dword [ebp - 0x1ac], 0
je 0x4028c4
mov dword [ebp - 0x3cc], 0
mov dword [ebp - 0x3c8], 0
lea eax, [ebp - 0x3cc]
push eax
push 0x495004
mov ecx, dword [ebp - 0x3c8]
push ecx
call dword [ebp - 0x1ac]
add esp, 0xc
mov dword [ebp - 0x3c4], eax
cmp dword [ebp - 0x3cc], 0
je 0x4028c4
call fcn.00403f40
test eax, eax
je 0x4028b9
call fcn.00403f40
mov ecx, eax
call fcn.00403f80
push eax
call dword [ebp - 0x3cc]
add esp, 4
jmp 0x4028c4
push 0
call dword [ebp - 0x3cc]
add esp, 4
mov dword [ebp - 0x400], 1
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x130]
call fcn.00434505
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x168]
call fcn.0040b800
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x11c]
call fcn.0040b760
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xd]
call fcn.0040cc20
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1b0]
call fcn.00404090
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1a8]
call fcn.004357e2
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x16c]
call fcn.00404090
mov eax, dword [ebp - 0x400]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0045ba52
mov esp, ebp
pop ebp
ret