Function at 0x4ad1d42b
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 [0x4ad2406c]
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 0x4ad24a60
mov dword [ebp - 0x63c], eax
call sub.msvcrt.dll__setjmp3
test eax, eax
pop ecx
pop ecx
je 0x4ad1d467
xor eax, eax
inc eax
jmp 0x4ad1d877
mov eax, dword [ebp - 0x63c]
push esi
push esi
push dword [eax + 0x3c]
call fcn.4ad01f27
mov edi, eax
push edi
mov dword [ebp - 0x628], edi
call fcn.4ad032eb
cmp word [edi], si
mov ebx, eax
mov dword [ebp - 0x630], ebx
je 0x4ad1d6a7
cmp word [ebx], si
je 0x4ad1d6a7
push ebx
call fcn.4ad032eb
cmp word [eax], si
jne 0x4ad1d6a7
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x4ad1d4b3
sub eax, edx
sar eax, 1
push edi
mov esi, eax
call fcn.4ad0156d
push eax
inc esi
push esi
push edi
call fcn.4ad01416
mov eax, ebx
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x4ad1d4d7
sub eax, ecx
sar eax, 1
push ebx
mov esi, eax
call fcn.4ad0156d
push eax
inc esi
push esi
push ebx
call fcn.4ad01416
push edi
call fcn.4ad08468
mov ebx, eax
cmp ebx, 1
jne 0x4ad1d50e
push dword [0x4ad240e0]
call fcn.4ad1d402
mov edi, 0x4ad25200
push edi
mov esi, 0x104
push esi
lea eax, [ebp - 0x214]
push eax
call fcn.4ad01416
push edi
push esi
lea eax, [ebp - 0x41c]
push eax
call fcn.4ad01416
lea eax, [ebp - 0x214]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad1d53d
mov ecx, dword [ebx + 0x18]
sub eax, edx
sar eax, 1
test byte [ecx], 0x10
mov dword [ebp - 0x634], eax
jne 0x4ad1d56b
push dword [ebx + 0x10]
lea eax, [ebp - 0x214]
push esi
push eax
call fcn.4ad014d2
jmp 0x4ad1d586
dec eax
mov dword [ebp - 0x634], eax
add eax, eax
and word [ebp + eax - 0x214], 0
and word [ebp + eax - 0x41c], 0
test byte [ebx + 0x1c], 8
jne 0x4ad1d5b8
lea eax, [ebp - 0x214]
push eax
call fcn.4ad0156d
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 0x4ad1d5b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
jmp 0x4ad1d509
mov eax, dword [ebp - 0x630]
cmp word [eax + 2], 0x3a
je 0x4ad1d6a7
movzx ecx, word [0x4ad40604]
push ecx
push eax
call fcn.4ad014ac
test eax, eax
jne 0x4ad1d6a7
mov ax, word [0x4ad25200]
and word [ebp - 8], 0
mov word [ebp - 0x624], ax
mov eax, dword [ebp - 0x628]
mov word [ebp - 0x622], 0x3a
mov word [ebp - 0xc], 0x2a
mov word [ebp - 0xa], 0x3f
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x4ad1d60f
sub eax, ecx
sar eax, 1
mov edi, eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x628]
call fcn.4ad023fa
push 0x20
cmp eax, edi
pop eax
lea ecx, [ebp - 0x62c]
push ecx
push dword [ebx + 0x18]
mov dword [ebp - 0x628], eax
push eax
lea eax, [ebp - 0x214]
sbb edi, edi
push eax
neg edi
call fcn.4ad01c2d
test al, al
jne 0x4ad1d6b1
push 0x10
pop eax
lea ecx, [ebp - 0x62c]
push ecx
push dword [ebx + 0x18]
mov dword [ebp - 0x628], eax
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.4ad01c2d
test al, al
jne 0x4ad1d698
cmp dword [0x4ad240e0], 0x12
jne 0x4ad1d503
mov dword [0x4ad240e0], 2
jmp 0x4ad1d503
test edi, edi
je 0x4ad1d6b1
push dword [ebp - 0x62c]
call fcn.4ad01c51
push 0x232a
jmp 0x4ad1d509
mov eax, dword [ebp - 0x634]
lea eax, [ebp + eax*2 - 0x214]
and word [eax], 0
and dword [ebp - 0x638], 0
cmp dword [0x4ad2415c], 0
jne 0x4ad1d888
mov eax, dword [ebx + 0x18]
test byte [eax], 0x10
je 0x4ad1d788
movzx eax, word [0x4ad40604]
push eax
lea eax, [ebp - 0x41c]
push eax
call fcn.4ad01a11
test eax, eax
je 0x4ad1d89d
mov ecx, dword [ebp - 0x630]
inc eax
inc eax
and word [eax], 0
lea edx, [ecx + 2]
mov di, word [ecx]
inc ecx
inc ecx
test di, di
jne 0x4ad1d70d
sub ecx, edx
sar ecx, 1
mov edi, ecx
lea ecx, [ebp - 0x41c]
lea edx, [ecx + 2]
mov dword [ebp - 0x640], edx
mov dx, word [ecx]
inc ecx
inc ecx
test dx, dx
jne 0x4ad1d72c
sub ecx, dword [ebp - 0x640]
sar ecx, 1
lea ecx, [ecx + edi + 1]
cmp ecx, esi
ja 0x4ad1d89d
push dword [ebp - 0x630]
mov ecx, eax
lea edx, [ebp - 0x41c]
sub ecx, edx
sar ecx, 1
mov edx, esi
sub edx, ecx
push edx
push eax
call fcn.4ad01416
lea eax, [ebp - 0x41c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad1d770
sub eax, edx
sar eax, 1
and word [ebp + eax*2 - 0x41c], cx
jmp 0x4ad1d806
mov edi, dword [ebp - 0x634]
lea edi, [ebp + edi*2 - 0x214]
and word [edi], 0
mov eax, dword [ebx + 0x18]
add eax, 0x2c
push eax
push esi
lea eax, [ebp - 0x214]
push eax
call fcn.4ad014d2
push edi
push dword [ebp - 0x630]
lea eax, [ebp - 0x624]
push esi
push eax
call fcn.4ad0edfc
lea eax, [ebp - 0x624]
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x4ad1d7ca
sub eax, ecx
mov ecx, dword [ebp - 0x634]
sar eax, 1
lea eax, [eax + ecx + 1]
cmp eax, esi
ja 0x4ad1d89d
and word [ebp + ecx*2 - 0x41c], dx
lea eax, [ebp - 0x624]
push eax
push esi
lea eax, [ebp - 0x41c]
push eax
call fcn.4ad014d2
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x4ad1d840
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4ad1d830
mov eax, 0x234d
push 0
push eax
mov dword [ebp - 0x638], eax
call fcn.4ad080e2
pop ecx
pop ecx
push dword [ebp - 0x62c]
push dword [ebp - 0x628]
push dword [ebx + 0x18]
call fcn.4ad0829e
test al, al
jne 0x4ad1d6c9
push dword [ebp - 0x62c]
call fcn.4ad01c51
call fcn.4ad08442
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.4ad013fa
leave
ret 4
push dword [ebp - 0x62c]
call fcn.4ad01c51
call fcn.4ad08442
jmp 0x4ad1d45f
push 0x232e
jmp 0x4ad1d509