Function at 0x4011bd
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x840
mov eax, dword [0x45208c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x83c], eax
inc edi
cmp dword [ebp + 8], 2
jne 0x40139e
mov ecx, dword [eax + 4]
mov edx, str.post_update_async
push 4
mov dword [ebp - 0x840], ecx
mov eax, ecx
pop esi
mov cx, word [eax]
xor ebx, ebx
cmp cx, word [edx]
mov ecx, dword [ebp - 0x840]
jne 0x401239
cmp word [eax], bx
je 0x401235
mov cx, word [eax + 2]
cmp cx, word [edx + 2]
mov word [ebp - 0x836], cx
mov ecx, dword [ebp - 0x840]
jne 0x401239
add eax, esi
add edx, esi
cmp word [ebp - 0x836], bx
jne 0x4011fc
mov eax, ebx
jmp 0x40123d
sbb eax, eax
or eax, edi
test eax, eax
je 0x401276
mov eax, str.post_update_sync
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x40126a
test dx, dx
je 0x401266
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x40126a
add ecx, esi
add eax, esi
test dx, dx
jne 0x401246
mov eax, ebx
jmp 0x40126e
sbb eax, eax
or eax, edi
test eax, eax
jne 0x4013a4
push 0x104
lea eax, [ebp - 0x41c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x401294
mov eax, edi
jmp 0x401866
lea eax, [ebp - 0x41c]
push eax
push str._s.running
lea eax, [ebp - 0x210]
push 0x103
push eax
call fcn.00401133
xor eax, eax
mov word [ebp - 0xa], ax
lea eax, [ebp - 0x210]
push ebx
push eax
call fcn.0040c0e6
add esp, 0x18
test eax, eax
jne 0x401309
lea eax, [ebp - 0x210]
push eax
push str._s.bak
lea eax, [ebp - 0x834]
push 0x103
push eax
call fcn.00401133
add esp, 0x10
xor eax, eax
mov word [ebp - 0x62e], ax
lea eax, [ebp - 0x834]
push edi
push eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea eax, [ebp - 0x210]
push str.running
push eax
call fcn.004010fa
mov eax, dword [ebp - 0x83c]
pop ecx
pop ecx
mov ecx, dword [eax + 4]
mov eax, str.post_update_sync
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x40134c
test dx, dx
je 0x401350
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x40134c
add ecx, esi
add eax, esi
test dx, dx
jne 0x40132a
jmp 0x401350
sbb ebx, ebx
or ebx, edi
test ebx, ebx
jne 0x40135f
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x41c]
push eax
push str._s.log
lea eax, [ebp - 0x628]
push 0x103
push eax
call fcn.00401133
xor eax, eax
mov word [ebp - 0x422], ax
lea eax, [ebp - 0x628]
push str.post_update
push eax
call fcn.004010fa
add esp, 0x18
jmp 0x401864
cmp dword [ebp + 8], 3
jge 0x4013be
push str._nApplication_Update_Service_Test_Helper_n_nUsage:_WORKINGDIR_INFILE_OUTFILE__s_SECONDS__FILETOLOCK__n___or:_WORKINGDIR_LOGFILE__ARG2_ARG3...__n___or:_signature_check_filepath_n___or:_setup_symlink_dir1_dir2_file_symlink_n___or:_remove_symlink_dir1_dir2_file_symlink_n___or:_check_symlink_symlink_n___or:_post_update_n_n__WORKINGDIR___tThe_relative_path_to_the_working_directory_to_use._n__INFILE_______tThe_relative_path_from_the_working_directory_for_the_file_to_n_______________tread_actions_to_perform_such_as_finish._n__OUTFILE______tThe_relative_path_from_the_working_directory_for_the_file_to_n_______________twrite_status_information._n__SECONDS______tThe_number_of_seconds_to_sleep._n__FILETOLOCK___tThe_relative_path_from_the_working_directory_to_an_existing_n_______________tfile_to_open_exlusively._n_______________tOnly_available_on_Windows_platforms_and_silently_ignored_on_n_______________tother_platforms._n__LOGFILE______tThe_relative_path_from_the_working_directory_to_log_the_n_______________tcommand_line_arguments._n__ARG2_ARG3..._tArguments_to_write_to_the_LOGFILE_after_the_preceding_command_n_______________tline_arguments._n_nNote:_All_paths_must_be_relative._n_n
push 2
call fcn.0040def4
pop ecx
push eax
call fcn.004011a4
pop ecx
pop ecx
jmp 0x40128d
mov ecx, dword [eax + 4]
mov edx, str.check_signature
push 4
mov dword [ebp - 0x840], ecx
pop esi
mov ax, word [ecx]
xor edi, edi
inc edi
xor ebx, ebx
cmp ax, word [edx]
mov eax, dword [ebp - 0x83c]
jne 0x40140f
cmp word [ecx], bx
je 0x40140b
mov ax, word [ecx + 2]
cmp ax, word [edx + 2]
mov word [ebp - 0x836], ax
mov eax, dword [ebp - 0x83c]
jne 0x40140f
add ecx, esi
add edx, esi
cmp word [ebp - 0x836], bx
jne 0x4013cf
mov ecx, ebx
jmp 0x401413
sbb ecx, ecx
or ecx, edi
test ecx, ecx
jne 0x40142b
push dword [eax + 8]
call fcn.00401bfb
neg eax
pop ecx
sbb eax, eax
neg eax
jmp 0x401866
mov ecx, dword [eax + 4]
mov edx, str.setup_symlink
mov ax, word [ecx]
cmp ax, word [edx]
mov eax, dword [ebp - 0x83c]
jne 0x40146e
cmp word [ecx], bx
je 0x40146a
mov ax, word [ecx + 2]
cmp ax, word [edx + 2]
mov word [ebp - 0x836], ax
mov eax, dword [ebp - 0x83c]
jne 0x40146e
add ecx, esi
add edx, esi
cmp word [ebp - 0x836], bx
jne 0x401433
mov ecx, ebx
jmp 0x401472
sbb ecx, ecx
or ecx, edi
test ecx, ecx
je 0x40128d
mov ecx, dword [eax + 4]
mov edx, str.remove_symlink
mov ax, word [ecx]
cmp ax, word [edx]
mov eax, dword [ebp - 0x83c]
jne 0x4014bd
cmp word [ecx], bx
je 0x4014b9
mov ax, word [ecx + 2]
cmp ax, word [edx + 2]
mov word [ebp - 0x836], ax
mov eax, dword [ebp - 0x83c]
jne 0x4014bd
add ecx, esi
add edx, esi
cmp word [ebp - 0x836], bx
jne 0x401482
mov ecx, ebx
jmp 0x4014c1
sbb ecx, ecx
or ecx, edi
test ecx, ecx
je 0x40128d
mov ecx, dword [eax + 4]
mov edx, str.check_symlink
mov ax, word [ecx]
cmp ax, word [edx]
mov eax, dword [ebp - 0x83c]
jne 0x40150c
cmp word [ecx], bx
je 0x401508
mov ax, word [ecx + 2]
cmp ax, word [edx + 2]
mov word [ebp - 0x836], ax
mov eax, dword [ebp - 0x83c]
jne 0x40150c
add ecx, esi
add edx, esi
cmp word [ebp - 0x836], bx
jne 0x4014d1
mov ecx, ebx
jmp 0x401510
sbb ecx, ecx
or ecx, edi
test ecx, ecx
je 0x40128d
mov ecx, dword [eax + 4]
mov edx, str.wait_for_service_stop
mov ax, word [ecx]
cmp ax, word [edx]
mov eax, dword [ebp - 0x83c]
jne 0x40155b
cmp word [ecx], bx
je 0x401557
mov ax, word [ecx + 2]
cmp ax, word [edx + 2]
mov word [ebp - 0x836], ax
mov eax, dword [ebp - 0x83c]
jne 0x40155b
add ecx, esi
add edx, esi
cmp word [ebp - 0x836], bx
jne 0x401520
mov ecx, ebx
jmp 0x40155f
sbb ecx, ecx
or ecx, edi
test ecx, ecx
jne 0x401589
push dword [eax + 0xc]
call fcn.0040dbfb
push eax
mov eax, dword [ebp - 0x83c]
push dword [eax + 8]
call fcn.00402db0
xor ecx, ecx
add esp, 0xc
cmp eax, edi
cmove eax, ecx
jmp 0x401866
mov ecx, dword [eax + 4]
mov edx, str.wait_for_application_exit
mov ax, word [ecx]
cmp ax, word [edx]
mov eax, dword [ebp - 0x83c]
jne 0x4015cc
cmp word [ecx], bx
je 0x4015c8
mov ax, word [ecx + 2]
cmp ax, word [edx + 2]
mov word [ebp - 0x836], ax
mov eax, dword [ebp - 0x83c]
jne 0x4015cc
add ecx, esi
add edx, esi
cmp word [ebp - 0x836], bx
jne 0x401591
mov ecx, ebx
jmp 0x4015d0
sbb ecx, ecx
or ecx, edi
test ecx, ecx
jne 0x401609
push dword [eax + 0xc]
call fcn.0040dbfb
push eax
mov eax, dword [ebp - 0x83c]
push dword [eax + 8]
call fcn.00402d78
mov ecx, eax
add esp, 0xc
xor eax, eax
test ecx, ecx
je 0x401866
cmp ecx, 0x102
setne al
inc eax
jmp 0x401866
mov ecx, dword [eax + 4]
mov edx, str.is_process_running
mov ax, word [ecx]
cmp ax, word [edx]
mov eax, dword [ebp - 0x83c]
jne 0x40164c
cmp word [ecx], bx
je 0x401648
mov ax, word [ecx + 2]
cmp ax, word [edx + 2]
mov word [ebp - 0x836], ax
mov eax, dword [ebp - 0x83c]
jne 0x40164c
add ecx, esi
add edx, esi
cmp word [ebp - 0x836], bx
jne 0x401611
mov ecx, ebx
jmp 0x401650
sbb ecx, ecx
or ecx, edi
test ecx, ecx
jne 0x40166e
push dword [eax + 8]
call fcn.0040284d
pop ecx
xor ecx, ecx
cmp eax, 0x490
setne cl
mov eax, ecx
jmp 0x401866
push dword [ebp - 0x840]
call fcn.0040c0db
pop ecx
test eax, eax
jne 0x40128d
mov eax, dword [ebp - 0x83c]
mov edx, 0x4478f4
mov ecx, dword [eax + 0x10]
mov ax, word [ecx]
cmp ax, word [edx]
mov eax, dword [ebp - 0x83c]
jne 0x4016cb
cmp word [ecx], bx
je 0x4016c7
mov ax, word [ecx + 2]
cmp ax, word [edx + 2]
mov word [ebp - 0x836], ax
mov eax, dword [ebp - 0x83c]
jne 0x4016cb
add ecx, esi
add edx, esi
cmp word [ebp - 0x836], bx
jne 0x401690
mov ecx, ebx
jmp 0x4016cf
sbb ecx, ecx
or ecx, edi
test ecx, ecx
jne 0x401803
push ebx
push ebx
call fcn.0040bce4
mov esi, eax
mov eax, dword [ebp - 0x83c]
push dword [eax + 8]
lea eax, [ebp - 0x41c]
push esi
push str._s__s
push 0x103
push eax
call fcn.00401133
xor eax, eax
mov word [ebp - 0x216], ax
mov eax, dword [ebp - 0x83c]
push dword [eax + 0xc]
lea eax, [ebp - 0x210]
push esi
push str._s__s
push 0x103
push eax
call fcn.00401133
mov esi, dword [ebp - 0x83c]
xor eax, eax
mov word [ebp - 0xa], ax
push dword [esi + 0x14]
call fcn.0040dbfb
or dword [ebp - 0x840], 0xffffffff
add esp, 0x34
cmp dword [ebp + 8], 7
mov dword [ebp - 0x83c], eax
jne 0x401784
push ebx
push ebx
push 3
push ebx
push ebx
push 0x40010000
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40178a
lea eax, [ebp - 0x210]
push str.error_locking
push eax
call fcn.004010fa
jmp 0x4013b7
mov esi, dword [ebp - 0x840]
lea eax, [ebp - 0x210]
push str.sleeping
push eax
call fcn.004010fa
lea eax, [ebp - 0x41c]
push str.finish_n
push eax
call fcn.00401002
add esp, 0x10
test al, al
jne 0x4017e2
mov edi, dword [ebp - 0x83c]
mov eax, ebx
inc ebx
cmp eax, edi
jg 0x4017e2
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x41c]
push str.finish_n
push eax
call fcn.00401002
pop ecx
pop ecx
test al, al
je 0x4017b9
cmp dword [ebp + 8], 7
jne 0x4017ef
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x210]
push str.finished
push eax
call fcn.004010fa
pop ecx
jmp 0x401863
push dword [eax + 8]
lea eax, [ebp - 0x628]
push 0x447938
push 0x103
push eax
call fcn.00401133
xor eax, eax
mov word [ebp - 0x422], ax
lea eax, [ebp - 0x628]
push 0x4472d0
push eax
call fcn.0040e233
add esp, 0x18
mov esi, eax
cmp dword [ebp + 8], edi
jle 0x40185d
mov eax, dword [ebp - 0x83c]
push dword [eax + edi*4]
push 0x447940
push esi
call fcn.004011a4
add esp, 0xc
inc edi
cmp edi, dword [ebp + 8]
jl 0x401840
push esi
call fcn.0041fb05
pop ecx
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403372
mov esp, ebp
pop ebp
ret