Function at 0x407ec0
Capabilities:
Move file
Print debug messages

Disassembly:
mov eax, 0x12c4
call fcn.0040e1e0
call fcn.00407ce0
test eax, eax
mov dword [esp], eax
jne 0x407ee0
call fcn.00407d20
mov dword [esp], eax
mov eax, dword [0x41787c]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x12d4]
push edi
cmp eax, esi
jg 0x4085cf
mov edi, dword [0x417890]
test edi, edi
je 0x407f44
mov ebp, dword [esp + 0x12dc]
test ebp, ebp
je 0x4085cf
test edi, edi
je 0x4085cf
mov ebx, dword [sym.imp.MSVCRT.dll__stricmp]
push ebp
push edi
call ebx
add esp, 8
test eax, eax
je 0x407f3c
mov edi, dword [edi + 0x14]
test edi, edi
jne 0x407f1f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x12c4
ret
test edi, edi
je 0x4085cf
mov ebx, dword [sym.imp.MSVCRT.dll__snprintf]
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x2d4]
rep stosd dword es:[edi], eax
test byte [0x417884], 3
je 0x408055
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.MSVCRT.dll_time]
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.MSVCRT.dll_localtime]
mov ebp, eax
mov al, byte [0x417884]
add esp, 8
test al, 1
je 0x407fef
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
inc eax
push edx
add ecx, 0x76c
push eax
push ecx
push str._04d__02d__02d
lea edx, [esp + 0xf0]
push 0x1f4
push edx
call ebx
lea edi, [esp + 0xf8]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x18
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x2d4]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x12d8]
test byte [0x417884], 2
je 0x408055
mov eax, dword [ebp]
mov ecx, dword [ebp + 4]
mov edx, dword [ebp + 8]
push eax
push ecx
push edx
push str._02d:_02d:_02d
lea eax, [esp + 0xf0]
push 0x1f4
push eax
call ebx
lea edi, [esp + 0xf8]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x18
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x2d4]
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x12d8]
test byte [0x417884], 4
je 0x408107
cmp esi, 0x14
ja case.0x40806f.5
xor eax, eax
mov al, byte [esi + 0x4085f4]
jmp dword [eax*4 + 0x4085dc]
lea edx, [esp + 0x2d4]
mov edi, str._ALL_
jmp 0x4080e2
lea edx, [esp + 0x2d4]
mov edi, str._DEBUG_
jmp 0x4080e2
lea edx, [esp + 0x2d4]
mov edi, str._NOTE__
jmp 0x4080e2
lea edx, [esp + 0x2d4]
mov edi, str._WARN__
jmp 0x4080e2
lea edx, [esp + 0x2d4]
mov edi, str._ERROR_
jmp 0x4080e2
push esi
push str.__d_
lea eax, [esp + 0xe8]
push 0x1f4
push eax
call ebx
add esp, 0x10
lea edi, [esp + 0xe0]
lea edx, [esp + 0x2d4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test byte [0x417884], 8
je 0x408161
mov eax, dword [esp + 0x10]
lea edx, [esp + 0xe0]
mov ecx, dword [eax]
push ecx
push str.__d_
push 0x1f4
push edx
call ebx
lea edi, [esp + 0xf0]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x2d4]
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test byte [0x417884], 0x10
je 0x4081c0
mov eax, dword [esp + 0x12dc]
test eax, eax
je 0x4081c0
push eax
push str.__s__t
lea eax, [esp + 0xe8]
push 0x1f4
push eax
call ebx
lea edi, [esp + 0xf0]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x2d4]
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test byte [0x417884], 0x20
je 0x408222
mov ecx, dword [esp + 0x12e0]
lea eax, [esp + 0x12e4]
push eax
push ecx
lea edx, [esp + 0xe8]
push 0x1f4
push edx
call dword [sym.imp.MSVCRT.dll__vsnprintf]
lea edi, [esp + 0xf0]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x2d4]
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x417038
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x2d4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov al, byte [0x417878]
mov ecx, ebp
and ecx, 3
test al, 1
rep movsb byte es:[edi], byte [esi]
je 0x408280
lea eax, [esp + 0x2d4]
push eax
push 0x417938
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
lea ecx, [esp + 0x2d4]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
test byte [0x417878], 2
je 0x4085cf
mov al, byte [0x417880]
lea edi, [esp + 0x2d4]
test al, 1
je 0x4082ce
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [0x4178b8]
lea edx, [esp + 0x2d4]
not ecx
dec ecx
push ecx
push edx
push eax
call dword [sym.imp.MSVCRT.dll__fileno]
add esp, 4
push eax
call dword [sym.imp.MSVCRT.dll__write]
mov ecx, dword [0x4178b8]
jmp 0x4082fc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov esi, dword [esp + 0x10]
lea edx, [esp + 0x2d4]
not ecx
mov eax, dword [esi + 4]
dec ecx
push ecx
push edx
push eax
call dword [sym.imp.MSVCRT.dll__fileno]
add esp, 4
push eax
call dword [sym.imp.MSVCRT.dll__write]
mov ecx, dword [esi + 4]
push ecx
call dword [sym.imp.MSVCRT.dll_fflush]
mov al, byte [0x417878]
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add esp, 0x10
test al, 4
je 0x40848f
mov edx, dword [0x417cb8]
push 0xffffffffffffffff
push edx
call ebp
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.MSVCRT.dll_time]
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.MSVCRT.dll_localtime]
mov esi, eax
mov eax, dword [0x417c08]
add esp, 8
test eax, eax
jne 0x408381
mov edx, dword [0x41789c]
push esi
mov dword [esi + 8], edx
mov eax, dword [0x417898]
mov dword [esi + 4], eax
mov ecx, dword [0x417894]
mov dword [esi], ecx
call dword [sym.imp.MSVCRT.dll_mktime]
mov ecx, dword [esp + 0x14]
add esp, 4
cmp eax, ecx
mov dword [0x417c08], eax
jge 0x408483
jmp 0x408479
cmp dword [esp + 0x10], eax
jle 0x408483
mov edx, dword [0x4178b8]
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
mov ecx, 0x19
lea edi, [esp + 0x7c]
rep stosd dword es:[edi], eax
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [0x417894]
mov ecx, dword [0x417898]
mov edx, dword [0x41789c]
push eax
mov eax, dword [esi + 0xc]
push ecx
mov ecx, dword [esi + 0x10]
push edx
mov edx, dword [esi + 0x14]
inc ecx
push eax
mov eax, dword [0x41788c]
add edx, 0x76c
push ecx
push edx
push eax
push str._s._04d_02d_02d_02d_02d_02d
lea ecx, [esp + 0x3c]
push 0x64
push ecx
call ebx
mov edx, dword [0x41788c]
lea eax, [esp + 0xa8]
push edx
push str._s.log
push 0x64
push eax
call ebx
lea ecx, [esp + 0x54]
lea edx, [esp + 0xb8]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_rename]
mov eax, dword [0x41788c]
add esp, 0x44
lea ecx, [esp + 0x18]
push 0x4178f8
push eax
push str._s._s
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edx, [esp + 0x28]
push 0x4178ec
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov dword [0x4178b8], eax
mov eax, dword [0x41789c]
mov dword [esi + 8], eax
mov ecx, dword [0x417898]
mov dword [esi + 4], ecx
mov edx, dword [0x417894]
push esi
mov dword [esi], edx
call dword [sym.imp.MSVCRT.dll_mktime]
mov ecx, dword [esp + 0x2c]
add esp, 0x1c
cmp eax, ecx
mov dword [0x417c08], eax
jge 0x408483
add eax, 0x15180
mov dword [0x417c08], eax
mov eax, dword [0x417cb8]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test byte [0x417878], 0x10
je 0x4085cf
mov ecx, dword [0x417cb8]
push 0xffffffffffffffff
push ecx
call ebp
mov edx, dword [0x4178b8]
mov esi, dword [sym.imp.MSVCRT.dll_ftell]
push edx
call esi
mov ebp, dword [sym.imp.MSVCRT.dll_fseek]
mov edi, eax
mov eax, dword [0x4178b8]
push 2
push 0
push eax
call ebp
mov ecx, dword [0x4178b8]
push ecx
call esi
mov edx, dword [0x4178b8]
push 0
push edi
push edx
mov esi, eax
call ebp
add esp, 0x20
cmp esi, 0x989680
jle 0x4085c3
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
mov ecx, 0x19
lea edi, [esp + 0x7c]
rep stosd dword es:[edi], eax
mov eax, dword [0x4178b8]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
mov ecx, dword [0x417888]
mov edx, dword [0x41788c]
push ecx
push edx
push str._s__d.log
lea eax, [esp + 0x28]
push 0x64
push eax
call ebx
mov ecx, dword [0x41788c]
lea edx, [esp + 0x94]
push ecx
push str._s.log
push 0x64
push edx
call ebx
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.MSVCRT.dll__unlink]
lea ecx, [esp + 0x44]
lea edx, [esp + 0xa8]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_rename]
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0x4c]
push 0x4178f8
rep stosd dword es:[edi], eax
mov eax, dword [0x41788c]
lea ecx, [esp + 0x50]
push eax
push str._s._s
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x44
lea edx, [esp + 0x18]
push 0x4178ec
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov dword [0x4178b8], eax
mov eax, dword [0x417888]
add esp, 8
inc eax
cmp eax, 9
mov dword [0x417888], eax
jle 0x4085c3
mov dword [0x417888], 0
mov eax, dword [0x417cb8]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x12c4
ret