Function at 0x418ed0
Capabilities:
Copy file
Create directory
Delete file
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4faf20
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xce4
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
mov dword [ebp - 0x10], esp
mov eax, dword [edi + 0x68]
mov dword [ebp - 0x1c], ebx
lea ecx, [ebx + 0x74]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x18], ecx
call fcn.004f4b50
test eax, eax
je 0x4198cc
lea ecx, [ebx + 0xb0]
call fcn.004f4b50
test eax, eax
je 0x4198cc
lea ecx, [ebx + 0xec]
call fcn.004f4b50
test eax, eax
je 0x4198cc
test edi, edi
je 0x4198c5
mov ecx, dword [edi + 0x6c]
test ecx, ecx
je 0x4198c5
mov edx, dword [ebx + 0x6c]
xor esi, esi
mov eax, dword [edx + 0x78]
mov edx, dword [eax + 0xcc]
test edx, edx
je 0x419003
push ecx
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString_1
push 0x5c
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], esi
call sub.MFC42.DLL_CString::ReverseFind
test eax, eax
jle 0x418ff4
inc eax
lea ecx, [ebp - 0x14]
push eax
lea eax, [ebp - 0x24]
push eax
call sub.MFC42.DLL_CString::Mid_1
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.004c830a
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
push 0x5419a0
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Find_2
test eax, eax
jle 0x418ff4
lea ecx, [ebp - 0x24]
push eax
push ecx
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call fcn.004c830a
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
mov edx, dword [ebx + 0x6c]
mov ecx, dword [ebp - 0x14]
push esi
push ecx
mov eax, dword [edx + 0x78]
mov ecx, dword [eax + 0xcc]
call fcn.004706c0
mov esi, eax
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov edx, dword [edi + 0x6c]
push esi
lea ecx, [ebx + 0x12c]
push edx
call fcn.0047c060
test eax, eax
jne 0x419041
push 0x82
mov ecx, edi
call fcn.00456190
push 0x1000
mov ecx, edi
call fcn.00456180
mov ecx, dword [ebp + 0xc]
push str._Patient_
call fcn.00455dc0
jmp 0x4198e4
mov eax, dword [edi + 0x6c]
push eax
call fcn.00464e10
add esp, 4
lea ecx, [ebp - 0x38]
call sub.MFC42.DLL_AFX_EXCEPTION_LINK::AFX_EXCEPTION_LINK
mov esi, dword [ebp - 0x18]
mov dword [ebp - 4], 3
mov ecx, esi
mov byte [ebp - 4], 4
call fcn.004f4ba0
mov ecx, esi
call fcn.004f4b80
test eax, eax
jne 0x4190d5
lea ecx, [ebp - 0x7dc]
push ecx
mov ecx, esi
call fcn.004f3060
lea ecx, [ebx + 0x12c]
call fcn.0047cd60
mov esi, eax
lea eax, [ebp - 0x6b0]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4190ba
test cl, cl
je 0x4190b6
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4190ba
add eax, 2
add esi, 2
test cl, cl
jne 0x419096
xor eax, eax
jmp 0x4190bf
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4190d2
mov ecx, dword [ebp - 0x18]
push 1
call fcn.004f4bc0
mov esi, dword [ebp - 0x18]
jmp 0x41906a
mov esi, dword [ebp - 0x18]
mov ecx, esi
call fcn.004f4b80
test eax, eax
je 0x419233
lea ecx, [ebx + 0x12c]
call fcn.0047cd90
mov ecx, 0x7e
mov esi, eax
lea edi, [ebp - 0x9d4]
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebx + 0x12c]
call fcn.0047cda0
mov ecx, 0xc7
mov esi, eax
lea edi, [ebp - 0xcf0]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x6c]
call fcn.004a4200
mov esi, eax
mov eax, dword [ebx + 0x6c]
mov ecx, dword [eax + 0x9c]
test ecx, ecx
je 0x4191bc
mov eax, dword [eax + 0x94]
lea ecx, [ebp - 0xcf0]
push ecx
lea edx, [ebp - 0x9d4]
lea ecx, [ebp - 0xca7]
push edx
push ecx
push eax
mov ecx, esi
call fcn.00487620
test eax, eax
je 0x419191
mov ecx, dword [ebx + 0x6c]
push 2
call fcn.0040af10
test eax, eax
je 0x4191bc
mov edx, dword [ebx + 0x6c]
push 0
push 0
push 2
mov eax, dword [edx + 0x94]
lea ecx, [ebp - 0xcf0]
push 0
lea edx, [ebp - 0x9d4]
push ecx
push edx
push eax
mov ecx, esi
call fcn.00487780
jmp 0x4191bc
mov eax, dword [ebx + 0x6c]
mov ecx, dword [eax + 0x98]
test ecx, ecx
je 0x4191bc
mov eax, dword [eax + 0x94]
lea ecx, [ebp - 0xcf0]
push 2
lea edx, [ebp - 0x9d4]
push ecx
push edx
push eax
mov ecx, esi
call fcn.00489790
lea eax, [ebp - 0xcf0]
lea ecx, [ebp - 0x9d4]
push eax
lea edx, [ebp - 0x7dc]
push ecx
push edx
call fcn.004e1ac0
mov eax, dword [ebx + 0x6c]
add esp, 0xc
lea edx, [ebp - 0x7dc]
mov ecx, dword [eax + 0x28]
push 1
mov dword [ebp - 0x7d8], ecx
mov ecx, dword [ebp - 0x18]
push edx
call fcn.004f41c0
test eax, eax
jne 0x419233
mov esi, dword [ebp + 8]
push 0x104
mov ecx, esi
call fcn.00456190
push 0x1000
mov ecx, esi
call fcn.00456180
mov ecx, dword [ebp + 0xc]
push str._Patient_Table_
call fcn.00455dc0
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_AfxTryCleanup
jmp 0x4198e4
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x7dc]
push eax
call fcn.004f3060
mov ecx, dword [ebp - 0x1c]
lea ebx, [ecx + 0xb0]
mov ecx, ebx
call fcn.004f4ba0
mov ecx, ebx
call fcn.004f4b80
test eax, eax
jne 0x4192c9
lea edx, [ebp - 0x134]
mov ecx, ebx
push edx
call fcn.004f3060
mov eax, dword [ebp - 0x130]
mov ecx, dword [ebp - 0x6b4]
cmp eax, ecx
jne 0x4192be
mov ecx, dword [ebp - 0x1c]
add ecx, 0x12c
call fcn.0047cd70
mov esi, eax
lea eax, [ebp - 0x12c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4192b5
test cl, cl
je 0x4192b1
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4192b5
add eax, 2
add esi, 2
test cl, cl
jne 0x419291
xor eax, eax
jmp 0x4192ba
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4192c9
push 1
mov ecx, ebx
call fcn.004f4bc0
jmp 0x419252
mov ecx, ebx
call fcn.004f4b80
test eax, eax
je 0x41936d
mov eax, dword [ebp - 0x1c]
lea ecx, [eax + 0x12c]
call fcn.0047cdb0
mov ecx, 0x36
mov esi, eax
lea edi, [ebp - 0x134]
lea edx, [ebp - 0x134]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x6b4]
push 1
mov dword [ebp - 0x130], ecx
push edx
mov ecx, ebx
call fcn.004f3130
test eax, eax
jne 0x41934e
mov esi, dword [ebp + 8]
push 0x104
mov ecx, esi
call fcn.00456190
push 0x1000
mov ecx, esi
call fcn.00456180
mov ecx, dword [ebp + 0xc]
push str._Series_
call fcn.00455dc0
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_AfxTryCleanup
jmp 0x4198e4
mov edx, dword [ebp - 0x3c8]
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x7dc]
inc edx
push eax
add ecx, 0x74
mov dword [ebp - 0x3c8], edx
call fcn.004f41f0
lea edx, [ebp - 0x134]
mov ecx, ebx
push edx
call fcn.004f3060
mov eax, dword [ebp - 0x1c]
lea ebx, [eax + 0xec]
mov ecx, ebx
mov dword [ebp - 0x24], ebx
call fcn.004f4ba0
mov ecx, ebx
call fcn.004f4b80
test eax, eax
jne 0x419405
lea ecx, [ebp - 0x258]
push ecx
mov ecx, ebx
call fcn.004f2b10
mov edx, dword [ebp - 0x254]
mov eax, dword [ebp - 0x134]
cmp edx, eax
jne 0x4193fa
mov eax, dword [ebp - 0x1c]
lea ecx, [eax + 0x12c]
call fcn.0047cd80
mov esi, eax
lea eax, [ebp - 0x250]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4193f1
test cl, cl
je 0x4193ed
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4193f1
add eax, 2
add esi, 2
test cl, cl
jne 0x4193cd
xor eax, eax
jmp 0x4193f6
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x419405
push 1
mov ecx, ebx
call fcn.004f4bc0
jmp 0x41938e
mov ecx, ebx
call fcn.004f4b80
test eax, eax
je 0x41983e
mov eax, dword [ebp - 0x1c]
lea ecx, [eax + 0x12c]
call fcn.0047cdc0
mov edx, dword [ebp + 8]
mov ecx, 0x49
mov esi, eax
lea edi, [ebp - 0x258]
mov eax, dword [edx + 0x6c]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x134]
push eax
mov dword [ebp - 0x254], ecx
lea ecx, [ebp - 0x18]
call sub.MFC42.DLL_CString::CString_1
mov edi, dword [ebp - 0x1c]
mov byte [ebp - 4], 5
mov ecx, dword [edi + 0x6c]
cmp dword [ecx + 0x90], 0xffffffff
je 0x419512
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x5c]
push edx
push eax
call dword [sym.imp.MSVCRT.dll__stat]
add esp, 8
test eax, eax
jl 0x419512
mov ecx, dword [edi + 0x6c]
mov eax, dword [ebp - 0x48]
cdq
mov esi, dword [ecx + 0x88]
push 0
add esi, eax
push 0x100000
mov dword [ecx + 0x88], esi
mov esi, dword [ecx + 0x8c]
adc esi, edx
mov dword [ecx + 0x8c], esi
mov esi, dword [edi + 0x6c]
mov ecx, dword [esi + 0x8c]
mov edx, dword [esi + 0x88]
push ecx
push edx
call fcn.004c8cf0
cmp dword [esi + 0x90], eax
jge 0x419512
lea ecx, [ebp + 0xc]
call sub.MFC42.DLL_CString::CString_3
push 0xae
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::LoadStringA
mov eax, dword [ebp + 0xc]
push 0
push eax
call fcn.00492830
mov esi, dword [ebp + 8]
add esp, 8
mov ecx, esi
push 0xae
call fcn.00456190
push 0x1000
mov ecx, esi
call fcn.00456180
mov byte [ebp - 4], 5
lea ecx, [ebp + 0xc]
jmp 0x4196a1
lea ecx, [ebp - 0x258]
push 1
push ecx
mov ecx, ebx
call fcn.004f2cc0
test eax, eax
jne 0x419553
mov esi, dword [ebp + 8]
push 0x104
mov ecx, esi
call fcn.00456190
push 0x1000
mov ecx, esi
call fcn.00456180
mov ecx, dword [ebp + 0xc]
push str._Image_Table_
call fcn.00455dc0
jmp 0x4196a6
lea edx, [ebp - 0x258]
mov ecx, ebx
push edx
call fcn.004f2b10
mov eax, dword [edi + 0x6c]
lea ecx, [ebp - 0x14]
add eax, 0x38
push eax
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [ebp - 0x14]
mov esi, dword [sym.imp.MSVCRT.dll__access]
push 0
push ecx
mov byte [ebp - 4], 7
call esi
add esp, 8
test eax, eax
je 0x4195c5
mov edx, dword [ebp - 0x14]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x4195c5
mov esi, dword [ebp + 8]
push 0xa6
mov ecx, esi
call fcn.00456190
push 0x1000
mov ecx, esi
call fcn.00456180
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 0xc]
push eax
call fcn.00455dc0
jmp 0x41969a
lea ecx, [ebp - 0x20]
call sub.MFC42.DLL_CString::CString_3
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::CString_3
mov ecx, dword [ebp - 0x1c]
mov bl, 9
mov byte [ebp - 4], bl
mov eax, dword [ecx + 0x6c]
cmp dword [eax + 0xa8], 2
jne 0x419614
lea edx, [ebp - 0x655]
lea ecx, [ebp - 0x20]
push edx
call fcn.004c8322
lea eax, [ebp - 0x20]
push eax
call fcn.00492640
add esp, 4
lea ecx, [ebp - 0x20]
push 0x5c
call sub.MFC42.DLL_CString::operator
jmp 0x419630
mov ecx, dword [ebp - 0x6b4]
mov edx, dword [eax + 0x28]
push ecx
push edx
lea eax, [ebp - 0x20]
push str._04X_08lX_
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::operator_1
mov edx, dword [ebp - 0x14]
push 0
push edx
call esi
add esp, 8
test eax, eax
je 0x4196c3
mov eax, dword [ebp - 0x14]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x4196c3
mov esi, dword [ebp + 8]
push 0xa6
mov ecx, esi
call fcn.00456190
push 0x1000
mov ecx, esi
call fcn.00456180
mov ecx, dword [ebp - 0x14]
push ecx
mov ecx, dword [ebp + 0xc]
call fcn.00455dc0
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_AfxTryCleanup
jmp 0x4198e4
mov edx, dword [ebp - 0x258]
lea eax, [ebp - 0x28]
push edx
push str._08lX.img
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::operator_1
mov edx, dword [ebp - 0x14]
push 0
push edx
call esi
add esp, 8
test eax, eax
jne 0x41970b
push eax
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 0x2c], 0xbe99d
jne 0x419724
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
jmp 0x419734
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x419782
mov esi, dword [ebp + 0xc]
lea ecx, [ebp + 0xc]
mov eax, dword [esi + 0x224]
push eax
call sub.MFC42.DLL_CString::CString_1
lea ecx, [ebp - 0x1bf]
mov byte [ebp - 4], 0xa
push ecx
lea ecx, [ebp + 0xc]
call sub.MFC42.DLL_CString::operator_2
mov edx, dword [ebp + 0xc]
mov ecx, esi
push edx
call fcn.00455dc0
mov ecx, dword [ebp - 0x24]
push 0
call fcn.004f4d50
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
jmp 0x41980c
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0x20]
push eax
lea edx, [ebp + 0xc]
push ecx
push edx
call sub.MFC42.DLL_operator_3
mov edi, dword [eax]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x1fa]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp + 0xc]
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x258]
push ecx
mov ecx, dword [ebp - 0x24]
call fcn.004f2e40
mov esi, dword [ebp - 0x1c]
mov eax, dword [esi + 0x6c]
mov ecx, dword [eax + 0xb4]
test ecx, ecx
je 0x4197f0
mov edx, dword [ebp - 0x14]
push 0
push edx
lea ecx, [eax + 0xbc]
call fcn.00472f10
mov edx, dword [ebp - 0x3c4]
lea eax, [ebp - 0x7dc]
inc edx
push eax
lea ecx, [esi + 0x74]
mov dword [ebp - 0x3c4], edx
call fcn.004f41f0
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
jmp 0x419860
cmp dword [ebp - 0x2c], 0xbe99d
jne 0x419860
mov esi, dword [ebp + 8]
push 0
mov ecx, dword [esi + 0x6c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edx, dword [esi + 0x6c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_AfxTryCleanup
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x82
jmp 0x4198d1
push 0x103
mov ecx, edi
call fcn.00456190
push 0x1000
mov ecx, edi
call fcn.00456180
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8