Function at 0x40a779
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x464
mov eax, dword [0x4b8f40]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x450]
push esi
mov esi, dword [ebp + 0xc]
push edi
push 0x44c
xor edi, edi
push edi
push eax
call fcn.0044f154
add esp, 0xc
mov dword [ebp - 0x454], edi
test ebx, ebx
je 0x40aa09
cmp dword [ebx + 0x21c], edi
je 0x40aa09
test esi, esi
je 0x40aa09
cmp dword [esi + 0x21c], edi
je 0x40aa09
push 1
lea eax, [ebp - 0x454]
push eax
push esi
call fcn.004096b0
test eax, eax
je 0x40aa13
push dword [ebp - 0x454]
push esi
call fcn.0040a454
push dword [ebp - 0x454]
test eax, eax
jne 0x40a812
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40aa13
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call fcn.0040a61d
test eax, eax
je 0x40aa13
push esi
call fcn.0040a61d
test eax, eax
je 0x40a9e9
mov ecx, dword [ebx + 0x21c]
mov dword [ebp - 0x464], edi
cmp dword [ecx], edi
jbe 0x40a9e9
mov edx, edi
mov dword [ebp - 0x45c], edx
mov eax, dword [esi + 0x21c]
mov eax, dword [eax]
cmp eax, dword [esi + 4]
jae 0x40a9d6
mov eax, dword [ecx + 0xc]
add eax, edx
push eax
mov dword [ebp - 0x458], eax
call fcn.0041f694
push 0x5c
pop ecx
cmp word [eax], cx
jne 0x40a87d
add eax, 2
push eax
lea ecx, [esi + 0xc]
push ecx
push 0x47db20
lea eax, [ebp - 0x450]
push 0x104
push eax
call fcn.004026a1
mov eax, dword [ebp - 0x458]
add esp, 0x14
add eax, 0x208
mov dword [ebp - 0x460], eax
push eax
call fcn.0041f694
push 0x5c
pop ecx
cmp word [eax], cx
jne 0x40a8bd
add eax, 2
push eax
lea eax, [esi + 0xc]
push eax
push 0x47db20
lea eax, [ebp - 0x248]
push 0x104
push eax
call fcn.004026a1
add esp, 0x14
lea eax, [ebp - 0x450]
push eax
push dword [esi + 0x21c]
call fcn.0044b692
cmp eax, 0xffffffff
je 0x40a9c6
lea eax, [ebp - 0x450]
push eax
push dword [ebp - 0x458]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x40a940
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x458], eax
call fcn.0041e1d1
test eax, eax
je 0x40a934
push dword [ebp - 0x458]
push str.Failed_to_move_cab_file_from_queue_A_to_queue_B____u_r_n
call fcn.0041f2fe
pop ecx
pop ecx
push 0x30303030
call fcn.0044b12a
jmp 0x40a999
lea eax, [ebp - 0x248]
push eax
push dword [ebp - 0x460]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x40a996
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x460], eax
call fcn.0041e1d1
test eax, eax
je 0x40a97e
push dword [ebp - 0x460]
push str.Failed_to_move_instr_file_from_queue_A_to_queue_B____u_r_n
call fcn.0041f2fe
pop ecx
pop ecx
push 0x30303030
call fcn.0044b12a
lea eax, [ebp - 0x450]
push eax
call fcn.0041a4a8
jmp 0x40a999
xor edi, edi
inc edi
mov edx, dword [ebp - 0x464]
mov ecx, dword [ebx + 0x21c]
inc edx
add dword [ebp - 0x45c], 0x44c
mov dword [ebp - 0x464], edx
cmp edx, dword [ecx]
mov edx, dword [ebp - 0x45c]
jb 0x40a850
jmp 0x40a9e9
call fcn.0041e1d1
test eax, eax
je 0x40a9e9
push str.MoveQToQ:_OOM_Failed_to_append_to_destination_queue_plex_r_n
jmp 0x40a9e4
call fcn.0041e1d1
test eax, eax
je 0x40a9e9
push str.MoveQToQ:_destination_queue_is_full._Stopping_r_n
call fcn.0041fda5
push dword [esi + 0x214]
mov esi, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
call esi
push dword [ebx + 0x214]
call esi
push ebx
call fcn.004097e1
mov eax, edi
jmp 0x40aa15
push 0x30303030
call fcn.0044b12a
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0044d772
mov esp, ebp
pop ebp
ret 8