Function at 0x412d13
Capabilities:
Delete file
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push ebp
sub esp, 0x704
lea ebp, [esp - 4]
mov eax, dword [0x4a946c]
xor eax, ebp
mov dword [ebp + 0x704], eax
push 0x6c
mov eax, 0x46f56f
call fcn.004550bc
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x3c]
call fcn.00435c47
xor esi, esi
push 0xa
lea ecx, [ebp - 0x60]
mov dword [ebp - 4], esi
call fcn.00450218
mov byte [ebp - 4], 1
call fcn.00442144
push eax
lea ecx, [ebp - 0x24]
call fcn.0040132d
mov byte [ebp - 4], 2
call fcn.00442144
push eax
lea ecx, [ebp - 0x18]
call fcn.0040132d
mov byte [ebp - 4], 3
call fcn.00442144
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040132d
push 0x104
lea eax, [ebp + 0x600]
push eax
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp + 0x600]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00401759
push str._system32_native.exe
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0040177e
add esp, 0xc
push eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 5
call fcn.0040170c
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
mov byte [ebp - 4], 4
call fcn.004010af
push str._system32_native.dat
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.0040177e
add esp, 0xc
cmp dword [ebp + 0x710], esi
mov byte [ebp - 4], 6
je 0x413131
push 0x47f2ac
push 0xbc
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
cmp edi, esi
je 0x412e66
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
push 0x1001
push dword [ebp - 0x24]
lea ecx, [ebp - 0x78]
call fcn.0044da41
push ebx
push edi
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 7
call fcn.0044d1c4
lea ecx, [ebp - 0x78]
call fcn.0044d414
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 6
call fcn.0044d54a
push 0x80000002
lea ecx, [ebp - 0x3c]
call fcn.00435a09
push 1
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
mov edi, str.SYSTEMControlSet001ControlSession_Manager
push edi
call fcn.00401c93
lea ecx, [ebp - 0x3c]
call fcn.00436002
test eax, eax
mov esi, str.BootExecute
mov ebx, str.native
je 0x412f0c
lea eax, [ebp - 0x60]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push esi
call fcn.00401c93
push ecx
mov ecx, esp
mov dword [ebp - 0x14], esp
push edi
mov byte [ebp - 4], 8
call fcn.00401c93
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 6
call fcn.0043609d
push 0
push ebx
lea ecx, [ebp - 0x60]
call fcn.004502be
test eax, eax
jne 0x412f0c
push ebx
lea ecx, [ebp - 0x60]
call fcn.004504e0
lea eax, [ebp - 0x60]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push esi
call fcn.00401c93
push ecx
mov ecx, esp
mov dword [ebp - 0x14], esp
push edi
mov byte [ebp - 4], 9
call fcn.00401c93
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 6
call fcn.0043635e
push 1
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
mov edi, str.SYSTEMCurrentControlSetControlSession_Manager
push edi
call fcn.00401c93
lea ecx, [ebp - 0x3c]
call fcn.00436002
test eax, eax
je 0x412f9b
lea eax, [ebp - 0x60]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push esi
call fcn.00401c93
push ecx
mov ecx, esp
mov dword [ebp - 0x14], esp
push edi
mov byte [ebp - 4], 0xa
call fcn.00401c93
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 6
call fcn.0043609d
push 0
push ebx
lea ecx, [ebp - 0x60]
call fcn.004502be
test eax, eax
jne 0x412f9b
push ebx
lea ecx, [ebp - 0x60]
call fcn.004504e0
lea eax, [ebp - 0x60]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push esi
call fcn.00401c93
push ecx
mov ecx, esp
mov dword [ebp - 0x14], esp
push edi
mov byte [ebp - 4], 0xb
call fcn.00401c93
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 6
call fcn.0043635e
mov edi, dword [ebp - 0x20]
add edi, 0xec
mov ecx, edi
call fcn.00411f44
push 0x47b5e0
push dword [ebp - 0x40]
mov dword [ebp - 0x28], eax
call fcn.004589a9
xor ebx, ebx
cmp dword [ebp - 0x28], ebx
pop ecx
pop ecx
mov dword [ebp - 0x20], eax
jle 0x413119
mov esi, 0x47f22c
push ebx
mov ecx, edi
call fcn.004501a1
test eax, eax
je 0x41310f
push esi
lea ecx, [ebp - 0x18]
call fcn.00401759
push 0
push ebx
lea eax, [ebp - 0x68]
push eax
mov ecx, edi
call fcn.00449eb5
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0xc
call fcn.00402021
mov ecx, dword [ebp - 0x68]
add ecx, 0xfffffff0
mov byte [ebp - 4], 6
call fcn.004010af
push 0x47a5a4
lea ecx, [ebp - 0x18]
call fcn.004041d2
push 0x477979
lea ecx, [ebp - 0x14]
call fcn.00401c93
mov dword [ebp - 0x64], eax
push 1
push ebx
lea eax, [ebp - 0x44]
push eax
mov ecx, edi
mov byte [ebp - 4], 0xd
call fcn.00449eb5
push dword [ebp - 0x64]
push eax
call fcn.00404035
pop ecx
pop ecx
mov ecx, dword [ebp - 0x44]
add ecx, 0xfffffff0
mov byte [ebp - 0x19], al
call fcn.004010af
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
mov byte [ebp - 4], 6
call fcn.004010af
cmp byte [ebp - 0x19], 0
je 0x4130a3
push esi
lea ecx, [ebp - 0x18]
call fcn.004041d2
push 1
push ebx
lea eax, [ebp - 0x10]
push eax
mov ecx, edi
call fcn.00449eb5
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0xe
call fcn.00402021
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
mov byte [ebp - 4], 6
call fcn.004010af
push 0x478a80
lea ecx, [ebp - 0x18]
call fcn.004041d2
mov eax, dword [ebp - 0x18]
push dword [eax - 0xc]
lea ecx, [ebp - 0x18]
call fcn.00401482
push eax
lea eax, [ebp + 0x400]
push eax
call fcn.00457460
pop ecx
pop ecx
push 0x200
lea eax, [ebp]
push eax
lea eax, [ebp + 0x400]
push eax
call fcn.00454b40
pop ecx
push eax
lea eax, [ebp + 0x400]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp dword [ebp - 0x20], 0
je 0x41310f
push dword [ebp - 0x20]
add eax, eax
push 1
push eax
lea eax, [ebp]
push eax
call fcn.0045977a
add esp, 0x10
inc ebx
cmp ebx, dword [ebp - 0x28]
jl 0x412fd0
cmp dword [ebp - 0x20], 0
je 0x413292
push dword [ebp - 0x20]
call fcn.004584a6
pop ecx
jmp 0x413292
push dword [ebp - 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
call esi
push dword [ebp - 0x40]
call esi
push 0x80000002
lea ecx, [ebp - 0x3c]
call fcn.00435a09
push 1
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
mov edi, str.SYSTEMControlSet001ControlSession_Manager
push edi
call fcn.00401c93
lea ecx, [ebp - 0x3c]
call fcn.00436002
test eax, eax
mov esi, str.BootExecute
mov ebx, str.native
je 0x4131f5
lea eax, [ebp - 0x60]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push esi
call fcn.00401c93
push ecx
mov ecx, esp
mov dword [ebp - 0x14], esp
push edi
mov byte [ebp - 4], 0xf
call fcn.00401c93
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 6
call fcn.0043609d
push 0
push ebx
lea ecx, [ebp - 0x60]
call fcn.004502be
test eax, eax
je 0x4131f5
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x60]
call fcn.00450372
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.004010af
lea eax, [ebp - 0x60]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push esi
call fcn.00401c93
push ecx
mov ecx, esp
mov dword [ebp - 0x14], esp
push edi
mov byte [ebp - 4], 0x10
call fcn.00401c93
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 6
call fcn.0043635e
push 1
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
mov edi, str.SYSTEMCurrentControlSetControlSession_Manager
push edi
call fcn.00401c93
lea ecx, [ebp - 0x3c]
call fcn.00436002
test eax, eax
je 0x413292
lea eax, [ebp - 0x60]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push esi
call fcn.00401c93
push ecx
mov ecx, esp
mov dword [ebp - 0x14], esp
push edi
mov byte [ebp - 4], 0x11
call fcn.00401c93
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 6
call fcn.0043609d
push 0
push ebx
lea ecx, [ebp - 0x60]
call fcn.004502be
test eax, eax
je 0x413292
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x60]
call fcn.00450372
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.004010af
lea eax, [ebp - 0x60]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x14], esp
push esi
call fcn.00401c93
push ecx
mov ecx, esp
mov dword [ebp - 0x44], esp
push edi
mov byte [ebp - 4], 0x12
call fcn.00401c93
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 6
call fcn.0043635e
mov ecx, dword [ebp - 0x40]
add ecx, 0xfffffff0
call fcn.004010af
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
call fcn.004010af
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004010af
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
call fcn.004010af
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 0
call fcn.0045032f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.00435c67
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x704]
xor ecx, ebp
call fcn.004550ad
add ebp, 0x708
leave
ret 4