Function at 0x4021ca
Capabilities:
Delete file
Get common file path
Move file
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x411206
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x41c028]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
mov ebx, ecx
lea ecx, [esp + 0x18]
call dword [0x41278c]
and dword [esp + 0x58], 0
push 0x208
lea esi, [ebx + 0xc]
push 0
push esi
mov dword [esp + 0x44], esi
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x207
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
call fcn.0040255d
mov edi, dword [ebx + 0x25c]
xor ecx, ecx
mov eax, edi
mov edx, 0xc04
mul edx
seto cl
mov dword [ebx + 8], edi
neg ecx
or ecx, eax
push ecx
call sub.mfc90u.dll_new__
mov esi, eax
pop ecx
test esi, esi
je 0x402263
push esi
mov eax, edi
call fcn.00401009
mov eax, esi
jmp 0x402265
xor eax, eax
mov ecx, dword [ebx + 8]
imul ecx, ecx, 0xc04
push ecx
push 0
push eax
mov dword [ebx + 0x214], eax
call sub.MSVCR90.dll_memset
add esp, 0xc
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea edi, [esp + 0x20]
call fcn.00403a88
mov ecx, edi
mov byte [esp + 0x58], 1
mov eax, dword [ebx]
push ecx
push eax
lea eax, [esp + 0x34]
push eax
call fcn.00403c10
add esp, 0xc
mov byte [esp + 0x58], 2
mov eax, dword [eax]
xor esi, esi
cmp eax, esi
je 0x4022ba
mov eax, dword [eax]
jmp 0x4022bc
xor eax, eax
push eax
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class]
lea edi, [esp + 0x2c]
call fcn.00403bcb
lea edi, [esp + 0x20]
mov byte [esp + 0x58], 5
call fcn.00403bcb
cmp dword [ebx + 0x25c], esi
mov dword [esp + 0x20], esi
jle 0x40248a
xor edi, edi
mov eax, dword [ebx + 0x258]
add eax, edi
cmp dword [eax], 0
je 0x40246a
mov eax, dword [eax + 4]
mov ecx, dword [ebx + 0x214]
mov dword [esi + ecx], eax
mov eax, dword [ebx + 0x258]
mov ecx, dword [ebx + 0x214]
mov eax, dword [edi + eax + 0x10]
lea ecx, [esi + ecx + 0x404]
movzx edx, word [eax]
inc eax
mov word [ecx], dx
inc eax
inc ecx
inc ecx
test dx, dx
jne 0x402324
mov eax, dword [ebx + 0x258]
mov ecx, dword [edi + eax + 0x14]
mov eax, dword [ebx + 0x214]
lea edx, [esi + eax + 0x804]
movzx eax, word [ecx]
inc ecx
mov word [edx], ax
inc ecx
inc edx
inc edx
test ax, ax
jne 0x40234a
mov eax, dword [ebx + 0x214]
lea eax, [esi + eax + 0x404]
push eax
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
mov eax, dword [ebx + 0x214]
mov ecx, dword [esp + 0x18]
lea edx, [esi + eax + 4]
movzx eax, word [ecx]
inc ecx
mov word [edx], ax
inc ecx
inc edx
inc edx
test ax, ax
jne 0x40237f
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x24]
call fcn.00403984
mov eax, dword [eax]
pop ecx
pop ecx
mov ecx, dword [ebx + 0x258]
mov ecx, dword [edi + ecx + 0x18]
push 9
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
neg eax
sbb al, al
inc al
lea ecx, [esp + 0x30]
mov byte [esp + 0x17], al
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
cmp byte [esp + 0x17], 0
je 0x402458
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x24]
call fcn.00403984
pop ecx
pop ecx
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x5c], 6
call dword [0x412774]
mov byte [esp + 0x58], 7
mov eax, dword [ebx + 0x258]
lea eax, [edi + eax + 0x18]
push eax
lea ecx, [esp + 0x28]
call dword [0x412774]
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x28]
mov byte [esp + 0x5c], 9
push eax
mov dword [0x41ca28], 1
call fcn.0040106f
lea ecx, [esp + 0x24]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [esp + 0x28]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [esp + 0x34]
mov byte [esp + 0x58], 5
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, dword [ebx + 0x258]
push dword [edi + eax + 0x18]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40246d
dec dword [ebx + 8]
inc dword [esp + 0x20]
mov eax, dword [esp + 0x20]
add esi, 0xc04
add edi, 0x20
cmp eax, dword [ebx + 0x25c]
jl 0x4022f0
lea ecx, [esp + 0x3c]
call sub.mfc90u.dll_CFile::CFile
lea eax, [esp + 0x34]
push 0x412b44
push eax
lea esi, [esp + 0x24]
mov byte [esp + 0x60], 0xa
call fcn.00403cb4
pop ecx
pop ecx
push 0
mov byte [esp + 0x5c], 0xb
mov eax, dword [eax]
push 0x1001
push eax
lea ecx, [esp + 0x48]
call sub.mfc90u.dll_CFile::Open
lea ecx, [esp + 0x34]
mov byte [esp + 0x58], 0xa
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push 4
lea esi, [ebx + 8]
push esi
lea ecx, [esp + 0x44]
call sub.mfc90u.dll_CFile::Write
push 0x208
push dword [esp + 0x3c]
lea ecx, [esp + 0x44]
call sub.mfc90u.dll_CFile::Write
mov eax, dword [esi]
imul eax, eax, 0xc04
push eax
push dword [ebx + 0x214]
lea ecx, [esp + 0x44]
call sub.mfc90u.dll_CFile::Write
lea ecx, [esp + 0x3c]
call sub.mfc90u.dll_CFile::Close
push ebx
call fcn.004029c5
push dword [ebx + 0x214]
call sub.mfc90u.dll_delete__
pop ecx
lea ecx, [esp + 0x3c]
mov byte [esp + 0x58], 5
call fcn.0040e202
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [esp + 0x18]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret