Function at 0x409830
Capabilities:
Check if file exists
Copy file
Delete file
Get common file path
Get file attributes
Move file
Read .ini file
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40ddef
mov eax, dword fs:[0]
push eax
sub esp, 0x868
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 edi, ecx
mov dword [ebp - 0x848], edi
push 0x40acb0
push 0x40ab10
push 1
push 8
lea eax, [ebp - 0x850]
push eax
call fcn.0040c6ed
push 0x40acb0
push 0x40ab10
push 2
push 8
lea eax, [ebp - 0x870]
mov dword [ebp - 4], 0
push eax
call fcn.0040c6ed
push 0x40acb0
push 0x40ab10
push 2
push 8
lea eax, [ebp - 0x860]
mov byte [ebp - 4], 1
push eax
call fcn.0040c6ed
mov ecx, edi
mov byte [ebp - 4], 2
call fcn.0040a5c0
push 0x104
lea eax, [ebp - 0x21c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4098e7
sub ecx, edx
sar ecx, 1
lea eax, [ecx - 1]
test eax, eax
jle 0x409914
nop dword [eax]
cmp word [ebp + eax*2 - 0x21c], 0x5c
je 0x409a09
dec eax
test eax, eax
jg 0x409900
push 0x412bac
lea eax, [ebp - 0x428]
push 0x106
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.mketools.dll_MkeCreateDirMulti]
push str.SupplySum.ini
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x634]
push str._s_s
push eax
call fcn.00403380
push str.SupplySum.ini
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x840]
push str._s_s
push eax
call fcn.00403380
add esp, 0x30
lea eax, [ebp - 0x840]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40999d
push 0
lea eax, [ebp - 0x840]
push eax
lea eax, [ebp - 0x634]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea ecx, [ebp - 0x428]
push ecx
lea ecx, [edi + 0xe8]
call dword [sym.imp.mfc140u.dll_ATL::CSimpleStringT_wchar_t_1_::operator]
mov ebx, dword [sym.imp.mfc140u.dll_operator_2]
push 0x24
call ebx
mov esi, eax
add esp, 4
mov dword [ebp - 0x844], esi
test esi, esi
je 0x409a25
mov dword [esi], vtable.MultiLangMan.0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
jmp 0x409a27
add eax, eax
cmp eax, 0x20c
jae 0x40a0a9
xor ecx, ecx
mov word [ebp + eax - 0x21c], cx
jmp 0x409914
xor esi, esi
mov dword [edi + 0xf0], esi
push 4
mov dword [esi + 4], 0x418d70
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
call ebx
add esp, 4
mov dword [ebp - 0x844], eax
mov byte [ebp - 4], 3
test eax, eax
je 0x409a6a
mov ecx, eax
call dword [sym.imp.mkeutlcl.dll_public:_void___thiscall_MkeResFinder::constructor_void_]
mov ecx, eax
jmp 0x409a6c
xor ecx, ecx
mov byte [ebp - 4], 2
mov eax, dword [esi + 4]
mov dword [esi + 0x18], ecx
push dword [eax + 0x44]
call dword [sym.imp.mkeutlcl.dll_public:_int___thiscall_MkeResFinder::Initialize_struct_HINSTANCE____]
mov ecx, dword [esi + 0x18]
push esi
call dword [sym.imp.mkeutlcl.dll_public:_void___thiscall_MkeResFinder::SetQuery_class_IResFinderQuery__]
push 0x634
mov dword [esi + 0x20], 0
call ebx
mov ebx, eax
mov dword [ebp - 0x844], eax
add esp, 4
test ebx, ebx
je 0x409ae1
push dword [0x418e58]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x410afc
push ebx
call esi
push str.SupplySum.ini
push ebx
call esi
push 0x42c
lea eax, [ebx + 0x208]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
jmp 0x409ae9
xor ebx, ebx
mov dword [ebp - 0x844], ebx
mov dword [edi + 0xec], ebx
mov esi, 0x418e8c
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
nop word [eax + eax]
mov eax, dword [esi - 4]
test eax, eax
je 0x409b51
push ebx
push 0x100
lea ecx, [ebp - 0x210]
push ecx
push str.SYMMAIN_DEFSTR
push dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x210]
push str.SYMMAIN_DEFSTR
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x409b46
push ebx
push dword [esi + 4]
push dword [esi]
push dword [esi - 4]
call edi
add esi, 0xc
cmp esi, 0x418e98
jl 0x409b00
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
lea edi, [ebx + 0x208]
push ebx
push 0
push str.RunLevel
push str.Main
call esi
push ebx
push 0
push str.Language
push str.Main
mov dword [edi], eax
call esi
push ebx
push 3
push str.ApLogLevel
push str.Main
mov dword [edi + 4], eax
call esi
push ebx
push 0x800
push str.ApLogMaxSize
push str.Main
mov dword [edi + 8], eax
call esi
push ebx
push 0
push str.ApLogOldSave
push str.Main
mov dword [edi + 0xc], eax
call esi
push edi
mov ecx, ebx
mov dword [edi + 0x10], eax
call fcn.00404ec0
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edi, [ebx + 0x21c]
push ebx
push 0x105
push edi
push str.c:SupplySum_temp_
push str.TempDirPath
push 0x410e2c
call esi
push dword [ebp - 0x844]
lea ebx, [edi + 0x20c]
push 0x105
push ebx
push str.c:SupplySumlog_
push str.LogDirPath
push 0x410e2c
call esi
mov esi, edi
mov ecx, 0x106
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x844]
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
lea eax, [esi + 0x21c]
push eax
push str.TempDirPath
push 0x410e2c
call edi
push esi
push ebx
push str.LogDirPath
push 0x410e2c
call edi
mov ebx, dword [ebp - 0x848]
push 0x18d8
mov eax, dword [ebx + 0xec]
mov eax, dword [eax + 0x20c]
mov dword [ebx + 0xcc], eax
call dword [sym.imp.mfc140u.dll_operator_2]
mov esi, eax
add esp, 4
mov dword [ebp - 0x844], esi
mov byte [ebp - 4], 4
test esi, esi
je 0x409d31
mov ecx, esi
call dword [sym.imp.mkeutlcl.dll_public:_void___thiscall_MkeWorkerThreadBaseCl::constructor_void_]
mov dword [esi + 0x24], vtable.ILogSaver.0
xor eax, eax
mov dword [esi], vtable.AppLogMan.1.0
mov dword [esi + 0x24], vtable.AppLogMan.0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
push 0x41c
push eax
mov word [esi + 0x30], ax
mov word [esi + 0x23c], ax
mov word [esi + 0x448], ax
mov word [esi + 0x654], ax
mov word [esi + 0x860], ax
mov word [esi + 0xa6c], ax
mov word [esi + 0xc78], ax
mov word [esi + 0xe84], ax
mov word [esi + 0x1090], ax
mov word [esi + 0x129c], ax
lea eax, [esi + 0x14a8]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esi + 0x18c8], 0
mov dword [esi + 0x18cc], 0
mov dword [esi + 0x18d0], 0
mov dword [esi + 0x18c4], 0
mov dword [esi + 0x18d4], 0
jmp 0x409d33
xor esi, esi
mov byte [ebp - 4], 2
mov ecx, esi
mov eax, dword [ebx + 0xec]
add eax, 0x208
mov dword [ebx + 0xf4], esi
push eax
call fcn.00403450
mov ebx, dword [ebx + 0xf4]
mov ecx, ebx
mov dword [ebp - 0x844], ebx
call fcn.00403a60
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea edi, [ebx + 0x860]
push edi
call esi
add ebx, 0xa6c
push ebx
call esi
mov eax, dword [ebp - 0x844]
add eax, 0xc78
push eax
call esi
mov eax, dword [ebp - 0x844]
add eax, 0xe84
push eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileW]
push edi
mov edi, dword [ebp - 0x844]
lea eax, [edi + 0x30]
push eax
call esi
push ebx
lea eax, [edi + 0x23c]
push eax
call esi
lea eax, [edi + 0xc78]
push eax
lea eax, [edi + 0x448]
push eax
call esi
lea eax, [edi + 0xe84]
push eax
lea eax, [edi + 0x654]
push eax
call esi
mov ebx, dword [ebp - 0x848]
push 1
mov edi, dword [ebx + 0xf4]
call dword [sym.imp.mketools.dll_MkeTlSetLineHeaderStyle]
add esp, 4
lea eax, [ebp - 0x634]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x409e28
push dword [0x418e58]
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call esi
push str.SupplySum.log
call dword [sym.imp.mketools.dll_MkeTlChangeLogFileName]
add esp, 4
lea eax, [ebp - 0x634]
push eax
call esi
jmp 0x409e36
push str.SupplySum.log
call dword [sym.imp.mketools.dll_MkeTlChangeLogFileName]
add esp, 4
call dword [sym.imp.mketools.dll_MkeTlCleanLogFile]
push str.___________SupplySum_start____________n
call dword [sym.imp.mketools.dll_MkeTlTraceLevel10]
mov eax, dword [edi + 0x28]
mov eax, dword [eax + 0xc]
shl eax, 0xa
push eax
call dword [sym.imp.mketools.dll_MkeTlChangeLogMaxSize]
mov eax, dword [edi + 0x28]
push dword [eax + 8]
call dword [sym.imp.mketools.dll_MkeTlSetLogLevel]
push dword [ebx + 0xe8]
push str.UserDataFolder:__s_n
call dword [sym.imp.mketools.dll_MkeTlTraceLevel21]
add esp, 0x14
push 0x12c
push 2
push 0x12c
call dword [sym.imp.mfc140u.dll_AfxFindResourceHandle]
push eax
call dword [sym.imp.USER32.dll_LoadBitmapW]
push eax
lea ecx, [ebp - 0x850]
call dword [sym.imp.mfc140u.dll_CGdiObject::Attach]
push 8
call dword [sym.imp.mfc140u.dll_operator_2]
add esp, 4
mov dword [ebp - 0x844], eax
mov byte [ebp - 4], 5
test eax, eax
je 0x409ec0
mov ecx, eax
call dword [sym.imp.mfc140u.dll_CImageList::CImageList]
jmp 0x409ec2
xor eax, eax
push 4
push 0x14
push 0x19
push 0x10
mov byte [ebp - 4], 2
mov ecx, eax
push 0x10
mov dword [ebx + 0x100], eax
call dword [sym.imp.mfc140u.dll_CImageList::Create]
mov eax, dword [ebx + 0x100]
push 0xff0000
push dword [ebp - 0x84c]
push dword [eax + 4]
call dword [sym.imp.COMCTL32.dll_ImageList_AddMasked]
lea edi, [ebx + 0x10c]
xor esi, esi
xor ebx, ebx
mov eax, dword [ebx + 0x412bec]
movzx eax, ax
push eax
push 2
push eax
call dword [sym.imp.mfc140u.dll_AfxFindResourceHandle]
push eax
call dword [sym.imp.USER32.dll_LoadBitmapW]
lea ecx, [ebp - 0x870]
push eax
add ecx, esi
call dword [sym.imp.mfc140u.dll_CGdiObject::Attach]
push 8
call dword [sym.imp.mfc140u.dll_operator_2]
add esp, 4
mov dword [ebp - 0x844], eax
mov byte [ebp - 4], 6
test eax, eax
je 0x409f4e
mov ecx, eax
call dword [sym.imp.mfc140u.dll_CImageList::CImageList]
jmp 0x409f50
xor eax, eax
push 4
push 0x14
push 0x19
push 0x20
mov byte [ebp - 4], 2
mov ecx, eax
push 0x20
mov dword [edi - 8], eax
call dword [sym.imp.mfc140u.dll_CImageList::Create]
mov ecx, dword [edi - 8]
lea eax, [ebp - 0x870]
add eax, esi
je 0x409f7d
mov eax, dword [ebp + esi - 0x86c]
push 0xff0000
push eax
push dword [ecx + 4]
call dword [sym.imp.COMCTL32.dll_ImageList_AddMasked]
mov eax, dword [ebx + 0x412be4]
movzx eax, ax
push eax
push 2
push eax
call dword [sym.imp.mfc140u.dll_AfxFindResourceHandle]
push eax
call dword [sym.imp.USER32.dll_LoadBitmapW]
lea ecx, [ebp - 0x860]
push eax
add ecx, esi
call dword [sym.imp.mfc140u.dll_CGdiObject::Attach]
push 8
call dword [sym.imp.mfc140u.dll_operator_2]
add esp, 4
mov dword [ebp - 0x874], eax
mov byte [ebp - 4], 7
test eax, eax
je 0x409fd8
mov ecx, eax
call dword [sym.imp.mfc140u.dll_CImageList::CImageList]
jmp 0x409fda
xor eax, eax
push 4
push 0x14
push 0x19
push 0x20
mov byte [ebp - 4], 2
mov ecx, eax
push 0x20
mov dword [edi], eax
call dword [sym.imp.mfc140u.dll_CImageList::Create]
mov ecx, dword [edi]
lea eax, [ebp - 0x860]
add eax, esi
je 0x40a005
mov eax, dword [ebp + esi - 0x85c]
push 0xff0000
push eax
push dword [ecx + 4]
call dword [sym.imp.COMCTL32.dll_ImageList_AddMasked]
add esi, 8
add ebx, 4
add edi, 4
cmp esi, 0x10
jl 0x409f02
mov ecx, dword [ebp - 0x848]
push dword [ecx + 0xcc]
mov ecx, dword [ecx + 0xf0]
call fcn.00406a50
push 0x40acb0
push 2
push 8
lea eax, [ebp - 0x860]
mov byte [ebp - 4], 1
push eax
call fcn.0040c3ba
push 0x40acb0
push 2
push 8
lea eax, [ebp - 0x870]
mov byte [ebp - 4], 0
push eax
call fcn.0040c3ba
push 0x40acb0
push 1
push 8
lea eax, [ebp - 0x850]
mov dword [ebp - 4], 0xffffffff
push eax
call fcn.0040c3ba
xor eax, eax
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
call fcn.0040c613
int3