Function at 0x42eb60
Capabilities:
Move file
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xbc
mov edx, dword [0x5214d4]
cmp byte [0x522d1f], 0
mov eax, dword [esp + 0xd4]
mov ecx, dword [esp + 0xd0]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0xd8]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], eax
mov eax, dword [sym.zsh.exe_curhist]
mov dword [esp + 0x28], eax
mov eax, dword [0x521470]
mov dword [esp + 0x40], eax
movsx eax, byte [0x522cf8]
mov dword [esp + 0x44], eax
je 0x42ec4c
xor eax, eax
cmp eax, dword [0x521478]
sbb eax, dword [0x52147c]
jge 0x42ec4c
mov eax, dword [sym.zsh.exe_hist_ring]
test eax, eax
je 0x42ec4c
test ecx, ecx
je 0x42ef58
test byte [esp + 0x30], 0x10
je 0x42ec60
mov eax, dword [0x521568]
mov edx, dword [0x52156c]
mov dword [esp + 8], 1
mov dword [esp], eax
mov dword [esp + 4], edx
call sym.zsh.exe_gethistent
mov esi, eax
test eax, eax
je 0x42ec4c
mov edx, dword [sym.zsh.exe_hist_ring]
xor eax, eax
test byte [esi + 8], 2
je 0x42ed75
mov edi, dword [esi + 0x28]
mov ebp, dword [esi + 0x2c]
add edi, 1
adc ebp, 0
cmp esi, edx
je 0x42ec40
mov esi, dword [esi + 0x10]
mov eax, 1
test esi, esi
jne 0x42ec14
lea esi, [esi]
mov dword [0x521568], edi
mov dword [0x52156c], ebp
add esp, 0xbc
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x34]
mov dword [esp + 4], 1
mov dword [esp], eax
call fcn.0042e220
test eax, eax
jne 0x42f3b8
mov eax, dword [sym.zsh.exe_hist_ring]
mov esi, dword [eax + 0x10]
mov edi, dword [esp + 0x30]
test edi, 0x8000
je 0x42ecd8
movzx edx, byte [0x522d5f]
movzx eax, byte [0x522cc6]
or al, byte [0x522d1d]
or al, byte [0x522d1e]
or al, dl
movzx ecx, byte [0x522d16]
jne 0x42ed50
mov dword [0x521518], 0
mov dword [0x52151c], 0
test cl, cl
jne 0x42ed5b
lea esi, [esi]
call sub.cygwin1.dll___errno
mov dword [eax], 0
mov eax, dword [esp + 0x34]
test byte [esp + 0x30], 1
jne 0x42ef18
cmp byte [0x522d15], 0
mov dword [esp], eax
jne 0x42ee60
call sym.zsh.exe_unmeta
mov dword [esp + 8], 0x180
mov dword [esp + 4], 0x8601
mov dword [esp], eax
call sub.cygwin1.dll__open64
test eax, eax
jns 0x42ef75
mov edx, dword [esp + 0x48]
test edx, edx
jne 0x42f3eb
mov eax, dword [esp + 0x34]
mov dword [esp + 0xd0], eax
add esp, 0xbc
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.0042e570
or edi, 3
mov dword [esp + 0x30], edi
test cl, cl
je 0x42ed60
or dword [esp + 0x30], 4
test dl, dl
mov eax, 1
cmove eax, dword [esp + 0x44]
mov dword [esp + 0x44], eax
jmp 0x42ecd8
test al, al
je 0x42ed85
mov dword [0x521568], edi
mov dword [0x52156c], ebp
mov eax, dword [esp + 0x34]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.0042e220
test eax, eax
jne 0x42ec4c
mov edx, dword [0x52147c]
mov eax, dword [0x521478]
mov ecx, dword [0x52147c]
mov ebx, dword [0x521478]
shrd eax, edx, 0x1c
mov edx, dword [0x52147c]
sar ecx, 0x1f
and ebx, 0xfffffff
and eax, 0xfffffff
add eax, ebx
shr edx, 0x18
mov edi, ecx
and ecx, 0xfffffffc
add eax, edx
and edi, 3
lea ebx, [eax + edi]
mov edi, 0xcccccccd
mov eax, ebx
mul edi
mov ebp, edx
and edx, 0x7ffffffc
shr ebp, 2
lea eax, [edx + ebp]
mov edx, dword [0x52147c]
sub ebx, eax
mov eax, dword [0x521478]
add ecx, ebx
mov ebx, ecx
sar ebx, 0x1f
sub eax, ecx
sbb edx, ebx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x38]
imul ecx, edx, 0xcccccccd
mov dword [esp + 0x3c], edx
imul edx, dword [esp + 0x38], 0xcccccccc
add ecx, edx
mul edi
add edx, ecx
add eax, dword [0x521478]
adc edx, dword [0x52147c]
cmp eax, dword [0x521518]
mov eax, edx
sbb eax, dword [0x52151c]
jge 0x42ec84
and dword [esp + 0x30], 0xffffffef
jmp 0x42ec84
call sym.zsh.exe_unmeta
mov dword [esp + 4], str..new
mov dword [esp], eax
call sym.zsh.exe_bicat
mov dword [esp], eax
mov dword [esp + 0x4c], eax
call sub.cygwin1.dll_unlink
test eax, eax
js 0x42f14b
mov edi, dword [esp + 0x34]
mov dword [esp], edi
call sym.zsh.exe_unmeta
lea edx, [esp + 0x50]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.cygwin1.dll__stat64
mov ebx, eax
call sub.cygwin1.dll__geteuid32
test ebx, ebx
jne 0x42f193
test eax, eax
je 0x42f193
cmp dword [esp + 0x68], eax
je 0x42f193
mov eax, dword [esp + 0x4c]
mov dword [esp], eax
call fcn.004e5e70
mov eax, dword [esp + 0x48]
test eax, eax
je 0x42ed33
movzx eax, byte [0x522cc6]
or al, byte [0x522d1d]
or al, byte [0x522d1e]
or al, byte [0x522d5f]
je 0x42f56f
mov dword [esp + 4], edi
mov dword [esp], str.rewriting__s_would_change_its_ownership____skipped
call sym.zsh.exe_zerr
jmp 0x42ed33
mov dword [esp], eax
call sym.zsh.exe_unmeta
mov dword [esp + 8], 0x180
mov dword [esp + 4], 0x8209
mov dword [esp], eax
call sub.cygwin1.dll__open64
test eax, eax
js 0x42ed27
mov dword [esp + 4], 0x4f319d
mov dword [esp], eax
call sub.cygwin1.dll__fdopen64
mov edi, eax
jmp 0x42ef87
mov dword [esp], 0x4f3158
call sym.zsh.exe_getsparam
mov dword [esp + 0x34], eax
test eax, eax
jne 0x42ebe0
jmp 0x42ec4c
mov dword [esp + 4], 0x4f319f
mov dword [esp], eax
call sub.cygwin1.dll__fdopen64
mov edi, eax
test edi, edi
je 0x42ed27
mov dword [esp + 0x4c], 0
call sym.zsh.exe_pushheap
mov dword [esp], str.HISTORY_IGNORE
call sym.zsh.exe_getsparam
mov dword [esp + 0x38], eax
test eax, eax
je 0x42efe6
mov dword [esp], eax
call sym.zsh.exe_dupstring
mov dword [esp], eax
mov ebx, eax
call sym.zsh.exe_tokenize
mov dword [esp], ebx
call sym.zsh.exe_remnulargs
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call sym.zsh.exe_patcompile
mov dword [esp + 0x38], eax
test esi, esi
je 0x42f475
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x28]
xor edx, edx
mov dword [esp + 0x40], 0
mov ebx, dword [esp + 0x2c]
and eax, 1
sub ecx, eax
sbb ebx, edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ebx
jmp 0x42f023
mov esi, dword [esi + 0x10]
test esi, esi
je 0x42f0ac
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
cmp eax, dword [esi + 0x28]
mov eax, edx
sbb eax, dword [esi + 0x2c]
jl 0x42f0ac
mov eax, dword [esi + 8]
test byte [esp + 0x30], 4
je 0x42f043
test al, 8
jne 0x42f0a0
test byte [esp + 0x30], 8
je 0x42f04e
test al, 0x10
jne 0x42f0a0
test al, 0x20
jne 0x42f0a0
mov eax, dword [esp + 0x38]
test eax, eax
je 0x42f089
mov dword [esp + 8], 6
mov dword [esp + 4], 0xffffffff
mov eax, dword [esi + 4]
mov dword [esp], eax
call sym.zsh.exe_metafy
mov dword [esp + 4], eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call sym.zsh.exe_pattry
test eax, eax
jne 0x42f0a0
test byte [esp + 0x30], 2
je 0x42f380
mov eax, dword [esi + 8]
test al, 0x42
je 0x42f218
nop
cmp esi, dword [sym.zsh.exe_hist_ring]
jne 0x42f018
mov esi, dword [esp + 0x40]
test esi, esi
je 0x42f475
test dword [esp + 0x30], 0x8000
mov dword [esp], edi
jne 0x42f40f
call sub.cygwin1.dll_fclose
test eax, eax
js 0x42f338
mov edi, dword [esp + 0x4c]
test edi, edi
je 0x42f119
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call sym.zsh.exe_unmeta
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.cygwin1.dll_rename
test eax, eax
js 0x42f526
mov eax, dword [0x4e7d6c]
test eax, eax
js 0x42f119
mov dword [esp], eax
call fcn.004e5db0
mov dword [0x4e7d6c], 0xffffffff
mov eax, dword [esp + 0x30]
and eax, 0x32
cmp eax, 2
je 0x42f490
call sym.zsh.exe_popheap
mov ecx, dword [esp + 0x4c]
test ecx, ecx
je 0x42ed33
mov eax, dword [esp + 0x4c]
mov dword [esp], eax
call fcn.004e5e70
jmp 0x42ed33
call sub.cygwin1.dll___errno
cmp dword [eax], 2
je 0x42ee89
mov eax, dword [esp + 0x48]
test eax, eax
setne al
test al, al
je 0x42f12e
mov ebx, dword [esp + 0x4c]
test ebx, ebx
je 0x42f3eb
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [esp], str.failed_to_write_history_file__s.new:__e
mov dword [esp + 8], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 4], eax
call sym.zsh.exe_zerr
jmp 0x42f13a
mov eax, dword [esp + 0x4c]
mov dword [esp + 8], 0x180
mov dword [esp + 4], 0xa01
mov dword [esp], eax
call sub.cygwin1.dll__open64
mov ebp, eax
test eax, eax
js 0x42f159
mov dword [esp + 4], 0x4f319f
mov dword [esp], eax
call sub.cygwin1.dll__fdopen64
mov edi, eax
test eax, eax
je 0x42f562
test ebx, ebx
jne 0x42ef97
mov ebx, dword [esp + 0x68]
mov ebp, dword [esp + 0x6c]
mov dword [esp], eax
call sub.cygwin1.dll_fileno
mov dword [esp + 4], ebx
mov dword [esp + 8], ebp
mov dword [esp], eax
call sub.cygwin1.dll__fchown32
mov dword [esp], edi
mov ebx, dword [esp + 0x60]
call sub.cygwin1.dll_fileno
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.cygwin1.dll_fchmod
jmp 0x42ef97
or eax, 2
mov dword [esi + 8], eax
test dword [esp + 0x30], 0x8000
je 0x42f26a
mov eax, dword [esi + 0x28]
mov edx, dword [esi + 0x2c]
add eax, 1
adc edx, 0
mov dword [0x521568], eax
mov dword [0x52156c], edx
mov dword [esp], edi
call sub.cygwin1.dll_ftell
mov dword [0x521550], eax
sar eax, 0x1f
mov dword [0x521554], eax
mov eax, dword [esi + 0x18]
add dword [0x521518], 1
adc dword [0x52151c], 0
mov dword [0x521544], eax
mov eax, dword [esi + 4]
mov ebp, dword [esp + 0x44]
mov dword [esp + 0x40], eax
test ebp, ebp
je 0x42f358
mov eax, dword [esi + 0x1c]
mov edx, dword [esi + 0x18]
mov dword [esp + 4], str.:__ld:_ld_
mov dword [esp], edi
mov ecx, eax
mov dword [esp + 8], edx
sub ecx, edx
test eax, eax
cmovne eax, ecx
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fprintf
test eax, eax
js 0x42f330
mov eax, dword [esp + 0x40]
movsx eax, byte [eax]
mov ebp, dword [esp + 0x40]
xor ebx, ebx
jmp 0x42f2e1
mov dword [esp + 4], edi
add ebx, 1
xor ecx, ecx
cmp al, 0x5c
mov dword [esp], eax
cmovne ebx, ecx
call sub.cygwin1.dll_fputc
test eax, eax
js 0x42f330
movsx eax, byte [ebp + 1]
add ebp, 1
test al, al
je 0x42f308
cmp al, 0xa
jne 0x42f2c0
mov dword [esp + 4], edi
mov dword [esp], 0x5c
call sub.cygwin1.dll_fputc
test eax, eax
js 0x42f330
movsx eax, byte [ebp]
jmp 0x42f2c0
test ebx, ebx
je 0x42f315
and ebx, 1
je 0x42f398
mov dword [esp + 4], edi
mov dword [esp], 0xa
call sub.cygwin1.dll_fputc
test eax, eax
jns 0x42f0a0
lea esi, [esi]
mov dword [esp], edi
call sub.cygwin1.dll_fclose
mov eax, dword [esp + 0x48]
test eax, eax
setne bl
call sym.zsh.exe_popheap
test bl, bl
jne 0x42f166
jmp 0x42f12e
mov eax, dword [esp + 0x40]
movsx eax, byte [eax]
cmp al, 0x3a
jne 0x42f2b3
mov dword [esp + 4], edi
mov dword [esp], 0x5c
call sub.cygwin1.dll_fputc
jmp 0x42f2a4
test dword [esp + 0x30], 0x8000
je 0x42f26a
jmp 0x42f23f
mov dword [esp + 4], edi
mov dword [esp], 0x20
call sub.cygwin1.dll_fputc
test eax, eax
jns 0x42f315
jmp 0x42f330
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [esp + 0xd0], str.locking_failed_for__s:__e
mov dword [esp + 0xd8], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0xd4], eax
add esp, 0xbc
pop ebx
pop esi
pop edi
pop ebp
jmp sym.zsh.exe_zerr
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [esp], str.failed_to_write_history_file__s:__e
mov dword [esp + 8], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 4], eax
call sym.zsh.exe_zerr
jmp 0x42ed33
call sub.cygwin1.dll_fflush
mov dword [esp], edi
test eax, eax
js 0x42f333
call sub.cygwin1.dll_fileno
lea edx, [esp + 0x50]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.cygwin1.dll__fstat64
test eax, eax
jne 0x42f457
mov eax, dword [esp + 0x78]
mov edx, dword [esp + 0x7c]
mov dword [0x521558], eax
mov eax, dword [esp + 0x88]
mov dword [0x52155c], edx
mov dword [0x521548], eax
mov eax, dword [0x521540]
mov dword [esp], eax
call sym.zsh.exe_zsfree
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call sym.zsh.exe_ztrdup
mov dword [0x521540], eax
mov dword [esp], edi
call sub.cygwin1.dll_fclose
test eax, eax
jns 0x42f0d6
jmp 0x42f338
mov edx, dword [0x52147c]
mov eax, dword [0x521478]
mov dword [esp + 0x14], 0xffffffff
mov dword [esp], 0
mov ebx, dword [0x521470]
mov dword [esp + 0x10], edx
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov dword [esp + 4], eax
mov dword [0x521470], 0
call fcn.0042e650
movsx eax, byte [0x522d16]
or dword [0x52146c], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call fcn.004302e0
movsx eax, byte [0x522d0e]
mov dword [0x52146c], eax
mov eax, dword [0x521494]
or eax, dword [0x521490]
jne 0x42f544
call fcn.0042e9b0
mov dword [0x521470], ebx
call sym.zsh.exe_popheap
jmp 0x42f12e
mov eax, dword [esp + 0x34]
mov dword [esp], str.cant_rename__s.new_to__HISTFILE
mov dword [esp + 4], eax
call sym.zsh.exe_zerr
call sym.zsh.exe_popheap
jmp 0x42f13a
mov eax, dword [esp + 0x48]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call fcn.0042eb60
jmp 0x42f511
mov dword [esp], ebp
call fcn.004e5db0
jmp 0x42f159
mov eax, dword [esp + 0x34]
mov dword [esp], str.rewriting__s_would_change_its_ownership____history_not_saved
mov dword [esp + 4], eax
call sym.zsh.exe_zerr
jmp 0x42ed33