Function at 0x101803b
Capabilities:
Move file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
push edi
xor edi, edi
push edi
lea eax, [ebp - 0xc]
mov esi, ecx
push eax
lea ebx, [esi + 0x88]
call fcn.01023557
push edi
lea eax, [ebp - 0x14]
push eax
call fcn.01023557
push edi
lea eax, [ebp - 0x2c]
push eax
call fcn.01023557
push 2
pop eax
push dword [0x10283e4]
mov word [ebp - 0x1c], ax
mov word [ebp - 0x1a], ax
mov word [ebp - 0x24], ax
mov word [ebp - 0x22], ax
lea eax, [ebp - 0x34]
push eax
mov dword [ebp - 0x18], 0x100148c
mov dword [ebp - 0x20], 0x100271c
call fcn.01023557
lea eax, [ebp - 0x2c]
push eax
mov ecx, esi
call fcn.01017fd2
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x1018213
movzx eax, word [ebp - 0x1c]
lea edi, [eax + eax*2]
mov eax, dword [ebp + 8]
movzx eax, word [eax]
add edi, eax
mov eax, dword [ebp + 0xc]
movzx eax, word [eax]
add edi, eax
movzx eax, word [ebx]
add edi, eax
movzx eax, word [ebp - 0x34]
add edi, eax
movzx eax, word [ebp - 0x2c]
add edi, eax
movzx eax, word [ebp - 0x24]
add edi, eax
cmp edi, 0xffff
ja 0x1018213
push edi
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
test eax, eax
mov esi, dword [sym.imp.ntdll.dll_RtlAppendUnicodeStringToString]
pop ecx
je 0x101815a
mov dword [ebp - 8], eax
push ebx
lea eax, [ebp - 0xc]
push eax
mov word [ebp - 0xa], di
call esi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xc]
push eax
call esi
push dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
call esi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xc]
push eax
call esi
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0xc]
push eax
call esi
mov eax, dword [ebp - 0x28]
add eax, 2
push eax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ntdll.dll_RtlAppendUnicodeToString]
push dword [ebp + 0xc]
lea eax, [ebp - 0xc]
push eax
call esi
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0xc]
push eax
call esi
jmp 0x101815f
mov eax, 0xc000009a
test eax, eax
jne 0x10181df
mov ecx, dword [ebp + 8]
movzx eax, word [ebp - 0x1c]
movzx ecx, word [ecx]
lea edi, [ecx + eax*2]
mov eax, dword [ebp + 0xc]
movzx eax, word [eax]
add edi, eax
movzx eax, word [ebx]
add edi, eax
movzx eax, word [ebp - 0x24]
add edi, eax
cmp edi, 0xffff
ja 0x1018213
push edi
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
test eax, eax
pop ecx
je 0x10181da
mov dword [ebp - 0x10], eax
push ebx
lea eax, [ebp - 0x14]
push eax
mov word [ebp - 0x12], di
call esi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
call esi
push dword [ebp + 8]
lea eax, [ebp - 0x14]
push eax
call esi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
call esi
push dword [ebp + 0xc]
lea eax, [ebp - 0x14]
push eax
call esi
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x14]
push eax
call esi
jmp 0x10181df
mov eax, 0xc000009a
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
test eax, eax
mov dword [ebp - 4], eax
jne 0x1018213
mov eax, dword [0x10283e8]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 8]
add eax, eax
add ecx, eax
add eax, edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x1018213
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
xor esi, esi
cmp dword [ebp - 0x28], esi
je 0x1018223
lea eax, [ebp - 0x2c]
push eax
call fcn.01023844
cmp dword [ebp - 0x10], esi
je 0x1018231
push dword [ebp - 0x10]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp - 8], esi
je 0x101823f
push dword [ebp - 8]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
mov eax, dword [0x1029018]
pop edi
cmp eax, esi
pop esi
pop ebx
je 0x1018284
mov ecx, dword [ebp - 4]
neg ecx
sbb ecx, ecx
and ecx, 0xc
xor edx, edx
dec ecx
inc edx
and ecx, 0x1f
shl edx, cl
or edx, 0x20
test dword [eax + 0x1c], edx
je 0x1018284
cmp byte [eax + 0x19], 3
jb 0x1018284
push dword [ebp - 4]
push dword [ebp + 8]
push 0x10026a0
push 0x40
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100e5ef
mov eax, dword [ebp - 4]
leave
ret 8