Function at 0x406530
Capabilities:
Copy file
Create directory
Get common file path
Move file
Query environment variable
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
push esi
push edi
mov dword [ebp - 0x10c], 0
mov ax, word [0x55c970]
mov word [ebp - 0xac], ax
mov cl, byte [0x55c8eb]
mov byte [ebp - 0x81], cl
mov edx, dword [0x55c92c]
mov dword [ebp - 0xbc], edx
xor eax, eax
mov word [ebp - 0x80], ax
mov dword [ebp - 0x144], 0x2855d
mov ecx, dword [0x55c92c]
mov dword [ebp - 0x88], ecx
mov edx, 0x34b8
mov word [ebp - 0xac], dx
movzx eax, word [ebp - 0xac]
mov ecx, dword [ebp - 0x10c]
add ecx, 0x6360c
or eax, ecx
mov dword [ebp - 0x10c], eax
mov edx, 0xe16b0
sub edx, dword [ebp - 0x10c]
movzx eax, byte [ebp - 0x81]
lea ecx, [edx + eax - 0x331d]
and ecx, 0x5469b
and ecx, 0x6d81e
mov dword [ebp - 0x10c], ecx
push 0
call dword [sym.imp.KERNEL32.dll_SetConsoleActiveScreenBuffer]
xor edx, edx
or eax, dword [ebp - 0x70]
or edx, dword [ebp - 0x6c]
or eax, dword [ebp - 0x70]
or edx, dword [ebp - 0x6c]
mov word [ebp - 0xac], ax
mov eax, 0x38a62
sub eax, dword [ebp - 0x10c]
mov ecx, dword [ebp - 0x10c]
add ecx, 0x7f2f7
and eax, ecx
and eax, dword [ebp - 0x10c]
mov dword [ebp - 0x10c], eax
mov edx, dword [ebp - 0x10c]
and edx, 0x24b54
and edx, dword [ebp - 0x10c]
or edx, 0x20e44
mov eax, dword [ebp - 0x10c]
add eax, dword [ebp - 0x10c]
or edx, eax
or edx, dword [ebp - 0x10c]
mov word [ebp - 0xac], dx
mov ecx, 1
test ecx, ecx
je 0x40667c
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MoveFileWithProgressA]
mov edx, dword [ebp - 0x10c]
sub edx, eax
sub edx, 0xa4dd
mov dword [ebp - 0x10c], edx
jmp 0x40669a
mov eax, dword [ebp - 0x10c]
add eax, 0x5f6c0
or eax, 0x71faa
or eax, dword [ebp - 0x10c]
xor ecx, ecx
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], ecx
mov edx, dword [ebp - 0x10c]
mov dword [ebp - 0x14c], edx
cmp dword [ebp - 0x14c], 0x19
je 0x406733
cmp dword [ebp - 0x14c], 0x3d
je 0x406754
cmp dword [ebp - 0x14c], 0x94
je 0x4066d1
jmp 0x4067ae
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
xor ecx, ecx
sub eax, dword [ebp - 0x70]
sbb ecx, dword [ebp - 0x6c]
movzx edx, word [ebp - 0xac]
mov esi, dword [ebp - 0x10c]
sub esi, edx
movzx edx, byte [ebp - 0x81]
lea edx, [esi + edx - 0x68b14]
movzx esi, word [ebp - 0xac]
sub edx, esi
add edx, dword [ebp - 0x10c]
movzx esi, byte [ebp - 0x81]
add edx, esi
xor esi, esi
and eax, edx
and ecx, esi
and eax, dword [ebp - 0x70]
and ecx, dword [ebp - 0x6c]
and eax, 0x2cc3
and ecx, 0
mov dword [ebp - 0xbc], eax
jmp 0x4067bb
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ecx, dword [ebp - 0x10c]
sub ecx, eax
add ecx, dword [ebp - 0x10c]
mov word [ebp - 0xac], cx
jmp 0x4067bb
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetNamedPipeInfo]
mov edx, dword [ebp - 0x10c]
lea esi, [eax + edx - 0x61c09]
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ecx, 0x33478
sub ecx, eax
sub ecx, 0x6eeaf
movzx edx, byte [ebp - 0x81]
sub ecx, edx
and esi, ecx
movzx eax, word [ebp - 0xac]
and eax, dword [ebp - 0x10c]
or esi, eax
mov dword [ebp - 0xbc], esi
jmp 0x4067bb
movzx ecx, word [ebp - 0xac]
mov dword [ebp - 0x10c], ecx
cmp dword [ebp - 0x10c], 0x3f63a
jne 0x4067f6
mov edx, dword [ebp - 0x10c]
cmp edx, dword [ebp - 0x10c]
jne 0x4067f6
mov eax, dword [ebp - 0x10c]
mov ecx, dword [ebp - 0x10c]
lea edx, [ecx + eax + 0x15b77]
add edx, dword [ebp - 0x10c]
mov dword [ebp - 0x10c], edx
jmp 0x406831
movzx eax, word [ebp - 0xac]
add eax, 0x12f47
cdq
mov ecx, dword [ebp - 0x10c]
mov esi, dword [ebp - 0x10c]
lea ecx, [esi + ecx + 0x53ca6]
xor esi, esi
sub ecx, dword [ebp - 0x70]
sbb esi, dword [ebp - 0x6c]
add ecx, 0x4f73d
adc esi, 0
or eax, ecx
or edx, esi
mov byte [ebp - 0x81], al
cmp dword [ebp - 0x70], 0x5c76f
jne 0x406844
cmp dword [ebp - 0x6c], 0
jne 0x406844
xor edx, edx
jne 0x406855
cmp dword [ebp - 0x10c], 0
je 0x406855
xor eax, eax
je 0x4068e3
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
mov esi, eax
add esi, dword [ebp - 0x10c]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionNamesA]
sub esi, eax
or esi, dword [ebp - 0x10c]
movzx edi, word [ebp - 0xac]
movzx ecx, word [ebp - 0xac]
add edi, ecx
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
sub edi, eax
sub edi, 0x9b16
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_FreeUserPhysicalPages]
mov edx, dword [ebp - 0x10c]
sub edx, eax
sub edx, 0x281f3
sub edx, dword [ebp - 0x10c]
and edi, edx
or esi, edi
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CopyFileExW]
or esi, eax
mov dword [ebp - 0x10c], esi
jmp 0x406910
mov eax, dword [ebp - 0x10c]
add eax, dword [ebp - 0x10c]
mov ecx, dword [ebp - 0x10c]
add ecx, dword [ebp - 0x10c]
mov edx, dword [ebp - 0x10c]
lea ecx, [ecx + edx + 0x10d51]
and eax, ecx
mov dword [ebp - 0x10c], eax
cmp dword [ebp - 0x10c], 0x66dc4
je 0x406937
xor edx, edx
jne 0x406937
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeMountPointA]
cmp eax, 0x7034a
jne 0x4069b8
push 0
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetNamedPipeHandleStateW]
mov esi, eax
add esi, 0x5a9c7
sub esi, dword [ebp - 0x10c]
sub esi, 0x6bb09
movzx eax, byte [ebp - 0x81]
mov ecx, dword [ebp - 0x10c]
lea edx, [ecx + eax + 0x4deea]
and esi, edx
mov edi, dword [ebp - 0x10c]
add edi, 0x46ecd
and edi, dword [ebp - 0x10c]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
and edi, eax
or esi, edi
or esi, 0x3d3b
xor eax, eax
mov ecx, dword [ebp - 0x70]
add ecx, 0xcbc4
mov edx, dword [ebp - 0x6c]
adc edx, 0
or esi, ecx
or eax, edx
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x6c], eax
jmp 0x4069e4
push 0
call dword [sym.imp.KERNEL32.dll_ResetEvent]
sub eax, dword [ebp - 0x10c]
sub eax, dword [ebp - 0x10c]
movzx ecx, word [ebp - 0xac]
sub eax, ecx
movzx edx, word [ebp - 0xac]
sub eax, edx
mov dword [ebp - 0x10c], eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateDirectoryExA]
mov dword [ebp - 0x10c], eax
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetDateFormatA]
cmp eax, 0x26783
je 0x406a1f
cmp dword [ebp - 0x10c], 0x4a4e0
je 0x406a1f
xor eax, eax
je 0x406a4f
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenJobObjectW]
mov ecx, 0x69c04
sub ecx, eax
sub ecx, dword [ebp - 0x10c]
mov edx, dword [ebp - 0x10c]
and edx, 0x4ae28
or ecx, edx
mov word [ebp - 0xac], cx
jmp 0x406a7b
movzx eax, byte [ebp - 0x81]
mov ecx, dword [ebp - 0x10c]
lea edx, [ecx + eax + 0x43b4]
and edx, 0x20728
and edx, 0xffffd23b
or edx, dword [ebp - 0x10c]
mov byte [ebp - 0x81], dl
movzx eax, word [ebp - 0xac]
cmp eax, dword [ebp - 0x10c]
jne 0x406aa4
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCalendarInfoW]
cmp dword [ebp - 0x10c], eax
je 0x406ac8
mov ecx, 1
test ecx, ecx
je 0x406adb
movzx edx, word [ebp - 0xac]
cmp edx, 0x3d32b
jne 0x406adb
cmp dword [ebp - 0x10c], 0x2d7dc
jne 0x406adb
mov eax, dword [ebp - 0x10c]
sub eax, 0x4505a
mov dword [ebp - 0x10c], eax
jmp 0x406b17
movzx eax, word [ebp - 0xac]
cdq
mov ecx, eax
mov esi, edx
sub ecx, dword [ebp - 0x70]
sbb esi, dword [ebp - 0x6c]
movzx eax, word [ebp - 0xac]
cdq
and ecx, eax
and esi, edx
mov edx, dword [ebp - 0x10c]
sub edx, dword [ebp - 0x10c]
and edx, dword [ebp - 0x10c]
xor eax, eax
or ecx, edx
or esi, eax
mov dword [ebp - 0x10c], ecx
mov al, byte [ebp - 0x81]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4