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

Disassembly:
sub esp, 0x410
mov eax, dword [0x4e86e0]
xor eax, esp
mov dword [esp + 0x40c], eax
push ebx
push ebp
mov ebp, dword [esp + 0x41c]
push esi
push ebp
mov esi, ecx
push str.bExtract_SYS__res_ID___d_n
push esi
call fcn.00421b50
lea eax, [esi + 0xa10]
push eax
lea ecx, [esi + 0x610]
push ecx
push str._s_s
lea eax, [esp + 0x30]
push 0x200
push eax
call fcn.00437120
lea ecx, [esp + 0x38]
push ecx
push str.szDestName___s_n
push esi
call fcn.00421b50
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
add esp, 0x2c
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
lea edx, [esp + 0x30]
push edx
call ebx
cmp eax, 0xffffffff
je 0x4232b6
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x42355e
push ebp
call fcn.00407dd0
add esp, 4
test eax, eax
jne 0x4232d8
push str.Resource_ID_not_valid_n
push esi
call fcn.00421b50
add esp, 8
xor eax, eax
jmp 0x42355e
cmp byte [esi + 0x810], 0
lea eax, [esi + 0x810]
je 0x42334c
push eax
lea eax, [esp + 0x21c]
push 0x200
push eax
call fcn.004917bc
add esp, 0xc
push edi
lea eax, [esp + 0x21c]
push eax
push str.szHostName___s_n
push esi
call fcn.00421b50
add esp, 0xc
lea ecx, [esp + 0x21c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
jne 0x423389
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x220]
push edx
push str.GetModuleHandle_failed_on_szHostName__s__error_code___X_n
push esi
call fcn.00421b50
add esp, 0x10
xor eax, eax
jmp 0x42355d
push 0x200
lea ecx, [esp + 0x21c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4232fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x21c]
push edx
push str.GetModuleFileName_failed_on_hostname__s__error_code___X_n
push esi
call fcn.00421b50
add esp, 0x10
xor eax, eax
jmp 0x42355e
movzx eax, bp
push 0xa
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebp, eax
test ebp, ebp
jne 0x4233b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.FindResource_failed__error_code___X_n
push esi
call fcn.00421b50
add esp, 0xc
xor eax, eax
jmp 0x42355d
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x4233e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LoadResource_failed__errorcode___X_n
push esi
call fcn.00421b50
add esp, 0xc
xor eax, eax
jmp 0x42355d
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push ebp
push edi
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x10], ebp
jne 0x423419
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SizeofResource_failed__errorcode___X_n
push esi
call fcn.00421b50
add esp, 0xc
xor eax, eax
jmp 0x42355d
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
lea ecx, [esp + 0x34]
push ecx
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x423525
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x20]
push edx
push str.Error_creating_sys_file__s__error_code___X_n
push esi
call fcn.00421b50
add esp, 0x10
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
lea ecx, [esp + 0x34]
push ecx
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x423525
mov ebp, dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edx, [esp + 0x1c]
push edx
push 0x200
call ebp
push 0x4bdd7c
lea eax, [esp + 0x20]
push 0x200
push eax
call fcn.00437060
lea eax, [esi + 0xa10]
push eax
lea ecx, [esp + 0x2c]
push 0x200
push ecx
call fcn.00437060
lea edx, [esp + 0x34]
push edx
push str.Try_2_:_szDestName___s_n
push esi
call fcn.00421b50
add esp, 0x24
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
lea eax, [esp + 0x34]
push eax
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x423513
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x20]
push ecx
push str.Try_2_:_Error_creating_sys_file__s__error_code___X_n
push esi
call fcn.00421b50
add esp, 0x10
xor eax, eax
jmp 0x42355d
lea eax, [esi + 0x610]
push eax
push 0x200
call ebp
mov ebp, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
push 0
lea edx, [esp + 0x1c]
push edx
push ebp
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
test ebx, ebx
jne 0x423554
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteFile_failed__errorcode___X_n
push esi
call fcn.00421b50
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
pop edi
mov ecx, dword [esp + 0x418]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00490dce
add esp, 0x410
ret 4