Function at 0x404140
Capabilities:
Copy file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40d660
mov eax, dword fs:[0]
push eax
sub esp, 0xe7c
mov eax, dword [0x418014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 8]
xor ebx, ebx
movaps xmm0, xmmword [0x413170]
mov dword [ebp - 0xe6c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xe70], eax
movups xmmword [ebp - 0xe84], xmm0
mov dword [ebp - 4], ebx
lea edx, [ebp - 0x428]
mov ecx, dword [0x418e58]
sub edx, ecx
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x4041a3
mov edi, dword [sym.imp.mketools.dll_MkeCatPathStr]
lea eax, [ebp - 0x428]
push str.SupplySum.ini
push eax
call edi
push dword [ebp - 0xe70]
lea eax, [ebp - 0x21c]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
lea eax, [ebp - 0x21c]
push str.SupplySum.ini
push eax
call edi
add esp, 0x1c
lea eax, [ebp - 0x21c]
push 0
push eax
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x428]
push eax
je 0x404228
push str._LogSave__INI_file_copy_success__s_____s_n
call dword [sym.imp.mketools.dll_MkeTlTraceLevel3]
add esp, 0xc
jmp 0x404239
push str._LogSave___ERR__Failed_in_copying_INI_file__s_____s_n
call dword [sym.imp.mketools.dll_MkeTlTraceLevel0]
add esp, 0xc
or ebx, 0xffffffff
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
xor edx, edx
cmp dword [esi + 0x18cc], edx
je 0x40426f
nop dword [eax]
cmp dword [esi + 0x18d0], 0
jne 0x40426a
push 0x64
call edi
cmp dword [esi + 0x18cc], 0
jne 0x404250
xor edx, edx
jmp 0x40426f
mov edx, 1
inc dword [esi + 0x18d4]
lea eax, [esi + 0x18d4]
cmp dword [esi + 0x18d0], 0
mov dword [ebp - 0xe74], eax
jne 0x40428e
test edx, edx
je 0x404293
mov ebx, 1
push dword [ebp - 0xe6c]
lea eax, [ebp - 0x634]
push str._sSupplySum_cur.lo
push 0x104
push eax
call fcn.004033f0
add esp, 0x10
lea eax, [esi + 0x23c]
push eax
lea eax, [esi + 0x30]
push eax
lea eax, [ebp - 0x634]
push eax
call fcn.004038e0
lea eax, [ebp - 0x634]
mov dword [ebp - 0xe68], eax
lea ecx, [ebp - 0xe84]
lea eax, [ebp - 0xe68]
push eax
call fcn.00404920
push dword [ebp - 0xe6c]
lea eax, [ebp - 0x840]
push str._s_versioninfo_cur.lo
push 0x104
push eax
call fcn.004033f0
add esp, 0x10
lea eax, [esi + 0x654]
push eax
lea eax, [esi + 0x448]
push eax
lea eax, [ebp - 0x840]
push eax
call fcn.004038e0
lea eax, [ebp - 0x840]
mov dword [ebp - 0xe68], eax
lea ecx, [ebp - 0xe84]
lea eax, [ebp - 0xe68]
push eax
call fcn.00404920
push dword [ebp - 0xe6c]
lea eax, [ebp - 0xa4c]
push str._sSupplySum_pre.lo
push 0x104
push eax
call fcn.004033f0
add esp, 0x10
lea eax, [esi + 0xa6c]
push eax
lea eax, [esi + 0x860]
push eax
lea eax, [ebp - 0xa4c]
push eax
call fcn.004038e0
lea eax, [ebp - 0xa4c]
mov dword [ebp - 0xe68], eax
lea ecx, [ebp - 0xe84]
lea eax, [ebp - 0xe68]
push eax
call fcn.00404920
push dword [ebp - 0xe6c]
lea eax, [ebp - 0xc58]
push str._s_versioninfo_pre.lo
push 0x104
push eax
call fcn.004033f0
add esp, 0x10
lea eax, [esi + 0xe84]
push eax
lea eax, [esi + 0xc78]
push eax
lea eax, [ebp - 0xc58]
push eax
call fcn.004038e0
lea eax, [ebp - 0xc58]
mov dword [ebp - 0xe68], eax
lea ecx, [ebp - 0xe84]
lea eax, [ebp - 0xe68]
push eax
call fcn.00404920
xor eax, eax
mov dword [ebp - 0xe6c], eax
cmp dword [ebp - 0xe7c], eax
jle 0x40453f
test ebx, ebx
jne 0x40453f
mov ecx, dword [ebp - 0xe78]
push dword [ecx + eax*4]
lea eax, [ebp - 0x428]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
lea eax, [ebp - 0xe88]
push eax
lea eax, [ebp - 0xe64]
push eax
push 0x104
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
push dword [ebp - 0xe70]
lea eax, [ebp - 0x21c]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
push dword [ebp - 0xe88]
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.mketools.dll_MkeCatPathStr]
push 0x410088
lea eax, [ebp - 0x21c]
push 0x106
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
add esp, 0x20
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x428]
push eax
je 0x4044be
push str._LogSave__APP_log_file_move_successful__s_____s_n
call dword [sym.imp.mketools.dll_MkeTlTraceLevel3]
jmp 0x4044ce
push str._LogSave___ERR__Failed_in_moving_APP_log_file__s_____s_n
call dword [sym.imp.mketools.dll_MkeTlTraceLevel0]
mov ebx, 0xfffffffe
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 0xe68], ecx
cmp dword [esi + 0x18cc], ecx
je 0x404504
cmp dword [esi + 0x18d0], 0
jne 0x4044ff
push 0x64
call edi
cmp dword [esi + 0x18cc], 0
jne 0x4044e1
mov ecx, dword [ebp - 0xe68]
jmp 0x404504
mov ecx, 1
cmp dword [esi + 0x18d0], 0
je 0x404517
mov eax, dword [ebp - 0xe74]
inc dword [eax]
jmp 0x404521
inc dword [esi + 0x18d4]
test ecx, ecx
je 0x404526
mov ebx, 1
mov eax, dword [ebp - 0xe6c]
inc eax
mov dword [ebp - 0xe6c], eax
cmp eax, dword [ebp - 0xe7c]
jl 0x404400
mov eax, dword [ebp - 0xe78]
test eax, eax
je 0x404553
push eax
call dword [sym.imp.mfc140u.dll_operator_1]
add esp, 4
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040c38d
mov esp, ebp
pop ebp
ret 8