Function at 0x4a22df2b
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 [0x4a2340ac]
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 0x4a234ac0
mov dword [ebp - 0x640], eax
call sub.msvcrt.dll__setjmp3
pop ecx
pop ecx
test eax, eax
je 0x4a22df67
xor eax, eax
inc eax
jmp 0x4a22e389
mov eax, dword [ebp - 0x640]
push esi
push esi
push dword [eax + 0x3c]
call fcn.4a2122ca
mov edi, eax
push edi
mov dword [ebp - 0x62c], edi
call fcn.4a21413b
mov ebx, eax
mov dword [ebp - 0x634], ebx
cmp word [edi], si
je 0x4a22e1ab
cmp word [ebx], si
je 0x4a22e1ab
push ebx
call fcn.4a21413b
cmp word [eax], si
jne 0x4a22e1ab
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x4a22dfb3
sub eax, edx
sar eax, 1
push edi
mov esi, eax
call fcn.4a212598
push eax
inc esi
push esi
push edi
call fcn.4a21185a
mov eax, ebx
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x4a22dfd7
sub eax, ecx
sar eax, 1
push ebx
mov esi, eax
call fcn.4a212598
push eax
inc esi
push esi
push ebx
call fcn.4a21185a
push edi
call fcn.4a219662
mov ebx, eax
cmp ebx, 1
jne 0x4a22e00e
push dword [0x4a234128]
call fcn.4a22df02
mov esi, 0x4a235260
push esi
mov edi, 0x104
push edi
lea eax, [ebp - 0x214]
push eax
call fcn.4a21185a
push esi
push edi
lea eax, [ebp - 0x41c]
push eax
call fcn.4a21185a
lea eax, [ebp - 0x214]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4a22e03d
mov ecx, dword [ebx + 0x18]
sub eax, edx
sar eax, 1
test byte [ecx], 0x10
mov dword [ebp - 0x630], eax
jne 0x4a22e06b
push dword [ebx + 0x10]
lea eax, [ebp - 0x214]
push edi
push eax
call fcn.4a2120a9
jmp 0x4a22e086
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 0x4a22e0b8
lea eax, [ebp - 0x214]
push eax
call fcn.4a212598
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 0x4a22e0b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
jmp 0x4a22e009
mov eax, dword [ebp - 0x634]
cmp word [eax + 2], 0x3a
je 0x4a22e1ab
movzx ecx, word [0x4a250664]
push ecx
push eax
call fcn.4a2118eb
test eax, eax
jne 0x4a22e1ab
mov ax, word [0x4a235260]
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 0x4a22e113
sub eax, edx
sar eax, 1
mov esi, eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x62c]
call fcn.4a211996
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.4a213117
test al, al
jne 0x4a22e1b5
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.4a213117
test al, al
jne 0x4a22e19c
cmp dword [0x4a234128], 0x12
jne 0x4a22e003
mov dword [0x4a234128], 2
jmp 0x4a22e003
test esi, esi
je 0x4a22e1b5
push dword [ebp - 0x628]
call fcn.4a212f5c
push 0x232a
jmp 0x4a22e009
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 [0x4a2341b4], 0
jne 0x4a22e39a
mov eax, dword [ebx + 0x18]
test byte [eax], 0x10
je 0x4a22e297
movzx eax, word [0x4a250664]
push eax
lea eax, [ebp - 0x41c]
push eax
call fcn.4a212148
test eax, eax
je 0x4a22e3af
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 0x4a22e218
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 0x4a22e231
sub ecx, esi
sar ecx, 1
lea eax, [ecx + eax + 1]
cmp eax, edi
ja 0x4a22e3af
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.4a21185a
lea eax, [ebp - 0x41c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4a22e27a
sub eax, edx
sar eax, 1
xor ecx, ecx
mov word [ebp + eax*2 - 0x41c], cx
jmp 0x4a22e318
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.4a2120a9
push esi
push dword [ebp - 0x634]
lea eax, [ebp - 0x624]
push edi
push eax
call 0x4a221d9b
lea eax, [ebp - 0x624]
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x4a22e2da
sub eax, ecx
mov ecx, dword [ebp - 0x630]
sar eax, 1
lea eax, [ecx + eax + 1]
cmp eax, edi
ja 0x4a22e3af
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.4a2120a9
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x4a22e352
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4a22e342
mov eax, 0x234d
push 0
push eax
mov dword [ebp - 0x638], eax
call fcn.4a216d44
pop ecx
pop ecx
push dword [ebp - 0x628]
push dword [ebp - 0x63c]
push dword [ebx + 0x18]
call fcn.4a2195f8
test al, al
jne 0x4a22e1cd
push dword [ebp - 0x628]
call fcn.4a212f5c
call fcn.4a21963c
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.4a2113a9
leave
ret 4
push dword [ebp - 0x628]
call fcn.4a212f5c
call fcn.4a21963c
jmp 0x4a22df5f
push dword [ebp - 0x628]
call fcn.4a212f5c
call fcn.4a21963c
push 0x232e
jmp 0x4a22e009