Function at 0x4038a0
Capabilities:
Delete file
Extract resource via kernel32 functions
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418d73
mov eax, dword fs:[0]
push eax
sub esp, 0x104
mov eax, dword [0x424320]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xdc], edx
mov byte [ebp - 0xbd], cl
push 0x14
xor eax, eax
mov dword [ebp - 0xc4], 7
push str.STARTING_ApplyUpdate
lea ecx, [ebp - 0xd8]
mov dword [ebp - 0xc8], 0
mov word [ebp - 0xd8], ax
call fcn.00404f00
xor dl, dl
mov dword [ebp - 4], 0
lea ecx, [ebp - 0xd8]
call fcn.004030c0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0xc4], 8
mov ebx, dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
jb 0x40393e
push dword [ebp - 0xd8]
call ebx
add esp, 4
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x41e7cc
mov edi, eax
push 0x65
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push edi
mov dword [ebp - 0xf8], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
lea ecx, [ebp - 0xbc]
mov edi, eax
call fcn.00409880
mov dword [ebp - 4], 1
lea edx, [ebp - 0xbc]
cmp dword [ebp - 0xa8], 8
mov dword [ebp - 0xc4], 7
cmovae edx, dword [ebp - 0xbc]
xor eax, eax
mov dword [ebp - 0xc8], 0
mov word [ebp - 0xd8], ax
cmp word [edx], ax
jne 0x4039bc
xor ecx, ecx
jmp 0x4039d0
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4039c1
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0xd8]
call fcn.00404f00
lea edx, [ebp - 0xd8]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x40]
call fcn.0040a310
mov byte [ebp - 4], 4
cmp dword [ebp - 0xc4], 8
jb 0x403a07
push dword [ebp - 0xd8]
call ebx
add esp, 4
push 1
xor eax, eax
mov dword [ebp - 0xc4], 7
push 0x41e50c
lea ecx, [ebp - 0x40]
mov dword [ebp - 0xc8], 0
mov word [ebp - 0xd8], ax
call fcn.00404820
push 3
push 0x41e7d0
lea ecx, [ebp - 0x40]
call fcn.00404820
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
push 0
cmovae eax, dword [ebp - 0x40]
push 0x100
push 2
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
test esi, esi
jne 0x403ad3
push 0x14
push str.APPLY_UPDATE_FAILURE
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], eax
mov word [ebp - 0x28], ax
call fcn.00404f00
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 5
call fcn.00402f20
mov byte [ebp - 4], 4
cmp dword [ebp - 0x14], 8
jb 0x403aa7
push dword [ebp - 0x28]
call ebx
add esp, 4
push 0x37
xor eax, eax
mov dword [ebp - 0x14], 7
push str.APPLY_UPDATE_FAILURE:_installerResourcesFileHandle_NULL
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00404f00
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x28]
jmp 0x403b43
push dword [ebp - 0xf8]
call dword [sym.imp.KERNEL32.dll_LockResource]
push 0
lea ecx, [ebp - 0x8c]
mov dword [ebp - 0x8c], 0
push ecx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x403b64
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.APPLY_UPDATE_FAILURE
lea ecx, [ebp - 0x28]
call fcn.004041c0
mov ecx, eax
mov byte [ebp - 4], 7
call fcn.00402f20
mov byte [ebp - 4], 4
cmp dword [ebp - 0x14], 8
jb 0x403b30
push dword [ebp - 0x28]
call ebx
add esp, 4
push str.APPLY_UPDATE_FAILURE:_WriteFile_FAILURE_:_fSuccess_FALSE
lea ecx, [ebp - 0x28]
call fcn.004041c0
mov byte [ebp - 4], 8
mov ecx, eax
xor dl, dl
call fcn.004030c0
cmp dword [ebp - 0x14], 8
jb 0x403b58
push dword [ebp - 0x28]
call ebx
add esp, 4
mov byte [ebp - 0xbd], 0
jmp 0x404054
push str.WriteFile_SUCCESS_:_zip_copied_to_temp_with_name_:
lea ecx, [ebp - 0x58]
call fcn.004041c0
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 9
push ecx
mov edx, eax
lea ecx, [ebp - 0x28]
call fcn.00406380
add esp, 4
xor dl, dl
mov byte [ebp - 4], 0xa
mov ecx, eax
call fcn.004030c0
cmp dword [ebp - 0x14], 8
jb 0x403ba1
push dword [ebp - 0x28]
call ebx
add esp, 4
xor eax, eax
mov byte [ebp - 4], 4
cmp dword [ebp - 0x44], 8
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
jb 0x403bc7
push dword [ebp - 0x58]
call ebx
add esp, 4
mov edi, dword [ebp - 0xdc]
lea ecx, [ebp - 0x88]
mov edx, edi
call fcn.004099f0
lea eax, [ebp - 0x88]
mov byte [ebp - 4], 0xb
push eax
mov edx, edi
lea ecx, [ebp - 0xa4]
call fcn.00409e20
add esp, 4
push str.destination_path_after_combine_is
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0xc
call fcn.004041c0
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], 0xd
push ecx
mov edx, eax
lea ecx, [ebp - 0x28]
call fcn.00406380
add esp, 4
xor dl, dl
mov byte [ebp - 4], 0xe
mov ecx, eax
call fcn.004030c0
cmp dword [ebp - 0x14], 8
jb 0x403c39
push dword [ebp - 0x28]
call ebx
add esp, 4
xor eax, eax
mov byte [ebp - 4], 0xc
cmp dword [ebp - 0x44], 8
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
jb 0x403c5f
push dword [ebp - 0x58]
call ebx
add esp, 4
push str.Resource0
lea ecx, [ebp - 0x70]
call fcn.004041c0
mov cl, byte [ebp - 0xbd]
lea eax, [ebp - 0xa4]
push eax
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 0xf
push eax
mov edx, edi
call fcn.00403420
add esp, 8
test al, al
je 0x403faa
lea ecx, [ebp - 0x88]
call fcn.0040a450
test eax, eax
je 0x403faa
call fcn.00401e90
mov ecx, eax
call fcn.004082d0
mov ecx, eax
call fcn.0040a5d0
lea edx, [ebp - 0x88]
mov ecx, edi
call fcn.0040b500
lea eax, [ebp - 0x70]
mov edx, edi
push eax
lea ecx, [ebp - 0x28]
call fcn.00409e20
add esp, 4
push str.default_full_path
lea ecx, [ebp - 0xd8]
mov byte [ebp - 4], 0x10
call fcn.004041c0
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0x11
push ecx
mov edx, eax
lea ecx, [ebp - 0x58]
call fcn.00406380
add esp, 4
xor dl, dl
mov byte [ebp - 4], 0x12
mov ecx, eax
call fcn.004030c0
lea ecx, [ebp - 0x58]
call fcn.00404290
lea ecx, [ebp - 0xd8]
mov byte [ebp - 4], 0x10
call fcn.00404290
cmp dword [ebp - 0x5c], 8
lea eax, [ebp - 0x70]
push dword [ebp - 0x60]
cmovae eax, dword [ebp - 0x70]
push eax
push dword [ebp - 0x78]
push ecx
lea ecx, [ebp - 0x88]
call fcn.00406a50
test eax, eax
je 0x403ea8
push str.UNIQUE_FOLDER_IS_NOT_EQUAL_TO_defaultFolderName
lea ecx, [ebp - 0xf4]
call fcn.004041c0
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 0x13
push ecx
mov edx, eax
lea ecx, [ebp - 0x110]
call fcn.00406380
add esp, 4
push str.defaultname
mov edx, eax
mov byte [ebp - 4], 0x14
lea ecx, [ebp - 0xd8]
call fcn.004062e0
add esp, 4
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 0x15
push ecx
mov edx, eax
lea ecx, [ebp - 0x58]
call fcn.00406380
add esp, 4
xor dl, dl
mov byte [ebp - 4], 0x16
mov ecx, eax
call fcn.004030c0
lea ecx, [ebp - 0x58]
call fcn.00404290
lea ecx, [ebp - 0xd8]
call fcn.00404290
lea ecx, [ebp - 0x110]
call fcn.00404290
lea ecx, [ebp - 0xf4]
mov byte [ebp - 4], 0x10
call fcn.00404290
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
lea eax, [ebp - 0xa4]
cmovae ecx, dword [ebp - 0x28]
cmp dword [ebp - 0x90], 8
push ecx
cmovae eax, dword [ebp - 0xa4]
push eax
call dword [sym.imp.MSVCR120.dll__wrename]
add esp, 8
test eax, eax
jne 0x403e41
push str.Rename_SUCCESS
lea ecx, [ebp - 0xf4]
call fcn.004041c0
xor dl, dl
mov byte [ebp - 4], 0x17
mov ecx, eax
call fcn.004030c0
lea ecx, [ebp - 0xf4]
mov byte [ebp - 4], 0x10
call fcn.00404290
lea ecx, [ebp - 0x70]
call fcn.0040a450
jmp 0x403ea8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x58]
call fcn.00401760
push str.Rename_ERROR_with_error_::
lea ecx, [ebp - 0x110]
mov byte [ebp - 4], 0x18
call fcn.004041c0
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0x19
push ecx
mov edx, eax
lea ecx, [ebp - 0xf4]
call fcn.00406380
add esp, 4
xor dl, dl
mov byte [ebp - 4], 0x1a
mov ecx, eax
call fcn.004030c0
lea ecx, [ebp - 0xf4]
call fcn.00404290
lea ecx, [ebp - 0x110]
call fcn.00404290
lea ecx, [ebp - 0x58]
call fcn.00404290
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0xf
call fcn.00404290
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.Going_to_delete_temp_file
lea ecx, [ebp - 0x110]
call fcn.004041c0
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0x1c
push ecx
mov edx, eax
lea ecx, [ebp - 0xf4]
call fcn.00406380
add esp, 4
xor dl, dl
mov byte [ebp - 4], 0x1d
mov ecx, eax
call fcn.004030c0
lea ecx, [ebp - 0xf4]
call fcn.00404290
lea ecx, [ebp - 0x110]
mov byte [ebp - 4], 0xf
call fcn.00404290
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push str.going_to_remove_empty_directory
lea ecx, [ebp - 0x110]
call fcn.004041c0
lea ecx, [ebp - 0xbc]
mov byte [ebp - 4], 0x1e
push ecx
mov edx, eax
lea ecx, [ebp - 0xf4]
call fcn.00406380
add esp, 4
xor dl, dl
mov byte [ebp - 4], 0x1f
mov ecx, eax
call fcn.004030c0
lea ecx, [ebp - 0xf4]
call fcn.00404290
lea ecx, [ebp - 0x110]
mov byte [ebp - 4], 0xf
call fcn.00404290
lea ecx, [ebp - 0xbc]
call fcn.0040ae30
push str.END_ApplyUpdate
lea ecx, [ebp - 0xf4]
call fcn.004041c0
xor dl, dl
mov byte [ebp - 4], 0x20
mov ecx, eax
call fcn.004030c0
lea ecx, [ebp - 0xf4]
call fcn.00404290
mov byte [ebp - 0xbd], 1
jmp 0x403fd9
push str.ApplyUpdateInternal_FAIL
lea ecx, [ebp - 0x58]
call fcn.004041c0
xor dl, dl
mov byte [ebp - 4], 0x1b
mov ecx, eax
call fcn.004030c0
cmp dword [ebp - 0x44], 8
jb 0x403fd2
push dword [ebp - 0x58]
call ebx
add esp, 4
mov byte [ebp - 0xbd], 0
cmp dword [ebp - 0x5c], 8
jb 0x403fe7
push dword [ebp - 0x70]
call ebx
add esp, 4
xor eax, eax
mov dword [ebp - 0x5c], 7
cmp dword [ebp - 0x90], 8
mov dword [ebp - 0x60], 0
mov word [ebp - 0x70], ax
jb 0x40400f
push dword [ebp - 0xa4]
call ebx
add esp, 4
xor eax, eax
mov dword [ebp - 0x90], 7
cmp dword [ebp - 0x74], 8
mov dword [ebp - 0x94], 0
mov word [ebp - 0xa4], ax
jb 0x40403d
push dword [ebp - 0x88]
call ebx
add esp, 4
xor eax, eax
mov dword [ebp - 0x74], 7
mov dword [ebp - 0x78], 0
mov word [ebp - 0x88], ax
cmp dword [ebp - 0x2c], 8
jb 0x404062
push dword [ebp - 0x40]
call ebx
add esp, 4
xor eax, eax
mov dword [ebp - 0x2c], 7
cmp dword [ebp - 0xa8], 8
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
jb 0x40408a
push dword [ebp - 0xbc]
call ebx
add esp, 4
mov al, byte [ebp - 0xbd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004176f4
mov esp, ebp
pop ebp
ret