Function at 0x522940
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov eax, dword [ebx]
mov eax, dword [eax + 4]
test eax, eax
jne 0x522966
mov eax, dword [ebx + 4]
mov eax, dword [eax + 4]
test eax, eax
je 0x5229e4
lea ecx, [ebp - 0x2c]
mov dword [esp], ebx
xor edi, edi
call fcn.00628750
lea ecx, [ebp - 0x2c]
sub esp, 4
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov word [esp], di
call fcn.006660c0
mov edx, dword [ebp - 0x2c]
sub esp, 0xc
mov edi, eax
mov ecx, dword [edx]
test ecx, ecx
je 0x5229b0
cmp ecx, 0xffffffff
je 0x5229c8
lock sub dword [edx], 1
mov edx, dword [ebp - 0x2c]
jne 0x5229c8
nop
mov dword [esp + 8], 4
mov dword [esp + 4], 2
mov dword [esp], edx
call fcn.004a4c50
cmp edi, 0xffffffff
jne 0x522b80
mov eax, dword [esi]
mov ecx, dword [eax + 4]
test ecx, ecx
jne 0x522a30
mov eax, dword [esi + 4]
mov edx, dword [eax + 4]
test edx, edx
jne 0x522a30
mov dword [ebp - 0x2c], 2
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0x7459f0
mov dword [esp + 4], str.Empty_filename_passed_to_function
lea eax, [ebp - 0x2c]
mov dword [esp], eax
call fcn.0072013c
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0x16
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea ecx, [ebp - 0x2c]
mov dword [esp], esi
call fcn.00628750
xor eax, eax
sub esp, 4
lea ecx, [ebp - 0x2c]
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov word [esp], ax
call fcn.006660c0
mov edx, dword [ebp - 0x2c]
sub esp, 0xc
mov edi, eax
mov ecx, dword [edx]
test ecx, ecx
je 0x522b24
cmp ecx, 0xffffffff
je 0x522a80
lock sub dword [edx], 1
mov edx, dword [ebp - 0x2c]
je 0x522b24
cmp edi, 0xffffffff
jne 0x522b80
lea ecx, [ebp - 0x2c]
mov dword [esp], esi
call fcn.00628750
lea ecx, [ebp - 0x2c]
sub esp, 4
call fcn.00665e50
lea ecx, [ebp - 0x30]
mov dword [esp], ebx
mov esi, eax
call fcn.00628750
lea ecx, [ebp - 0x30]
sub esp, 4
call fcn.00665e50
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
mov edx, dword [ebp - 0x30]
mov ebx, eax
sub esp, 8
mov eax, dword [edx]
test eax, eax
je 0x522b60
cmp eax, 0xffffffff
je 0x522ae4
lock sub dword [edx], 1
mov edx, dword [ebp - 0x30]
je 0x522b60
mov edx, dword [ebp - 0x2c]
mov ecx, dword [edx]
test ecx, ecx
je 0x522b41
cmp ecx, 0xffffffff
je 0x522afb
lock sub dword [edx], 1
mov edx, dword [ebp - 0x2c]
je 0x522b41
test ebx, ebx
mov eax, 1
jne 0x522a28
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp + 0x10]
mov dword [edi], eax
mov dword [edi + 4], 2
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 4
mov dword [esp + 4], 2
mov dword [esp], edx
call fcn.004a4c50
jmp 0x522a80
mov dword [esp + 8], 4
mov dword [esp + 4], 2
mov dword [esp], edx
call fcn.004a4c50
jmp 0x522afb
mov dword [esp + 8], 4
mov dword [esp + 4], 2
mov dword [esp], edx
call fcn.004a4c50
jmp 0x522ae4
mov dword [ebp - 0x2c], 2
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0x7459f0
mov dword [esp + 4], str.Broken_filename_passed_to_function
jmp 0x522a0f