Function at 0x4ad1df2b
Capabilities:
Check if file exists
Get file attributes
Move file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x640
mov eax, dword [0x4ad240ac]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor esi, esi
push esi
push 0x4ad24ac0
mov dword [ebp - 0x640], eax
call sub.msvcrt.dll__setjmp3
pop ecx
pop ecx
test eax, eax
je 0x4ad1df67
xor eax, eax
inc eax
jmp 0x4ad1e389
mov eax, dword [ebp - 0x640]
push esi
push esi
push dword [eax + 0x3c]
call fcn.4ad022ca
mov edi, eax
push edi
mov dword [ebp - 0x62c], edi
call fcn.4ad0413b
mov ebx, eax
mov dword [ebp - 0x634], ebx
cmp word [edi], si
je 0x4ad1e1ab
cmp word [ebx], si
je 0x4ad1e1ab
push ebx
call fcn.4ad0413b
cmp word [eax], si
jne 0x4ad1e1ab
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x4ad1dfb3
sub eax, edx
sar eax, 1
push edi
mov esi, eax
call fcn.4ad02598
push eax
inc esi
push esi
push edi
call fcn.4ad0185a
mov eax, ebx
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x4ad1dfd7
sub eax, ecx
sar eax, 1
push ebx
mov esi, eax
call fcn.4ad02598
push eax
inc esi
push esi
push ebx
call fcn.4ad0185a
push edi
call fcn.4ad09662
mov ebx, eax
cmp ebx, 1
jne 0x4ad1e00e
push dword [0x4ad24128]
call fcn.4ad1df02
mov esi, 0x4ad25260
push esi
mov edi, 0x104
push edi
lea eax, [ebp - 0x214]
push eax
call fcn.4ad0185a
push esi
push edi
lea eax, [ebp - 0x41c]
push eax
call fcn.4ad0185a
lea eax, [ebp - 0x214]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad1e03d
mov ecx, dword [ebx + 0x18]
sub eax, edx
sar eax, 1
test byte [ecx], 0x10
mov dword [ebp - 0x630], eax
jne 0x4ad1e06b
push dword [ebx + 0x10]
lea eax, [ebp - 0x214]
push edi
push eax
call fcn.4ad020a9
jmp 0x4ad1e086
dec eax
mov dword [ebp - 0x630], eax
add eax, eax
xor ecx, ecx
mov word [ebp + eax - 0x214], cx
mov word [ebp + eax - 0x41c], cx
test byte [ebx + 0x1c], 8
jne 0x4ad1e0b8
lea eax, [ebp - 0x214]
push eax
call fcn.4ad02598
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, dword [ebx + 0x18]
mov dword [ecx], eax
mov eax, dword [ebx + 0x18]
cmp dword [eax], 0xffffffff
jne 0x4ad1e0b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
jmp 0x4ad1e009
mov eax, dword [ebp - 0x634]
cmp word [eax + 2], 0x3a
je 0x4ad1e1ab
movzx ecx, word [0x4ad40664]
push ecx
push eax
call fcn.4ad018eb
test eax, eax
jne 0x4ad1e1ab
mov ax, word [0x4ad25260]
push 0x3a
mov word [ebp - 0x624], ax
pop eax
mov word [ebp - 0x622], ax
push 0x2a
pop eax
mov word [ebp - 0xc], ax
push 0x3f
pop eax
mov word [ebp - 0xa], ax
xor eax, eax
mov word [ebp - 8], ax
mov eax, dword [ebp - 0x62c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad1e113
sub eax, edx
sar eax, 1
mov esi, eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x62c]
call fcn.4ad01996
push 0x20
cmp eax, esi
pop eax
lea ecx, [ebp - 0x628]
push ecx
push dword [ebx + 0x18]
mov dword [ebp - 0x63c], eax
push eax
lea eax, [ebp - 0x214]
sbb esi, esi
push eax
neg esi
call fcn.4ad03117
test al, al
jne 0x4ad1e1b5
push 0x10
pop eax
lea ecx, [ebp - 0x628]
push ecx
push dword [ebx + 0x18]
mov dword [ebp - 0x63c], eax
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.4ad03117
test al, al
jne 0x4ad1e19c
cmp dword [0x4ad24128], 0x12
jne 0x4ad1e003
mov dword [0x4ad24128], 2
jmp 0x4ad1e003
test esi, esi
je 0x4ad1e1b5
push dword [ebp - 0x628]
call fcn.4ad02f5c
push 0x232a
jmp 0x4ad1e009
mov eax, dword [ebp - 0x630]
xor ecx, ecx
and dword [ebp - 0x638], ecx
lea eax, [ebp + eax*2 - 0x214]
mov word [eax], cx
cmp dword [0x4ad241b4], 0
jne 0x4ad1e39a
mov eax, dword [ebx + 0x18]
test byte [eax], 0x10
je 0x4ad1e297
movzx eax, word [0x4ad40664]
push eax
lea eax, [ebp - 0x41c]
push eax
call fcn.4ad02148
test eax, eax
je 0x4ad1e3af
inc eax
inc eax
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [ebp - 0x634]
mov dword [ebp - 0x62c], eax
lea edx, [ecx + 2]
mov ax, word [ecx]
inc ecx
inc ecx
test ax, ax
jne 0x4ad1e218
sub ecx, edx
sar ecx, 1
mov eax, ecx
lea ecx, [ebp - 0x41c]
lea esi, [ecx + 2]
mov dx, word [ecx]
inc ecx
inc ecx
test dx, dx
jne 0x4ad1e231
sub ecx, esi
sar ecx, 1
lea eax, [ecx + eax + 1]
cmp eax, edi
ja 0x4ad1e3af
mov eax, dword [ebp - 0x62c]
push dword [ebp - 0x634]
lea ecx, [ebp - 0x41c]
sub eax, ecx
sar eax, 1
mov ecx, edi
sub ecx, eax
push ecx
push dword [ebp - 0x62c]
call fcn.4ad0185a
lea eax, [ebp - 0x41c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad1e27a
sub eax, edx
sar eax, 1
xor ecx, ecx
mov word [ebp + eax*2 - 0x41c], cx
jmp 0x4ad1e318
mov esi, dword [ebp - 0x630]
xor eax, eax
lea esi, [ebp + esi*2 - 0x214]
mov word [esi], ax
mov eax, dword [ebx + 0x18]
add eax, 0x2c
push eax
push edi
lea eax, [ebp - 0x214]
push eax
call fcn.4ad020a9
push esi
push dword [ebp - 0x634]
lea eax, [ebp - 0x624]
push edi
push eax
call fcn.4ad11d9b
lea eax, [ebp - 0x624]
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x4ad1e2da
sub eax, ecx
mov ecx, dword [ebp - 0x630]
sar eax, 1
lea eax, [ecx + eax + 1]
cmp eax, edi
ja 0x4ad1e3af
xor eax, eax
mov word [ebp + ecx*2 - 0x41c], ax
lea eax, [ebp - 0x624]
push eax
push edi
lea eax, [ebp - 0x41c]
push eax
call fcn.4ad020a9
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x4ad1e352
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4ad1e342
mov eax, 0x234d
push 0
push eax
mov dword [ebp - 0x638], eax
call fcn.4ad06d44
pop ecx
pop ecx
push dword [ebp - 0x628]
push dword [ebp - 0x63c]
push dword [ebx + 0x18]
call fcn.4ad095f8
test al, al
jne 0x4ad1e1cd
push dword [ebp - 0x628]
call fcn.4ad02f5c
call fcn.4ad0963c
xor eax, eax
cmp dword [ebp - 0x638], eax
setne al
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.4ad013a9
leave
ret 4
push dword [ebp - 0x628]
call fcn.4ad02f5c
call fcn.4ad0963c
jmp 0x4ad1df5f
push dword [ebp - 0x628]
call fcn.4ad02f5c
call fcn.4ad0963c
push 0x232e
jmp 0x4ad1e009