Function at 0x401bfd
Capabilities:
Check if file exists
Create directory
Get disk information
Get file attributes
Get file size
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xbc4
push ebx
push esi
push edi
xor ebx, ebx
mov esi, str.Replace
lea edi, [ebp - 0x4c4]
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
xor eax, eax
mov ecx, 0x41
mov dword [ebp - 0x14], ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x4bb]
push ebx
rep stosd dword es:[edi], eax
push ebx
lea ecx, [ebp - 0x4c]
stosb byte es:[edi], al
lea eax, [ebp - 0x9c]
push eax
push ecx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
mov ecx, 0xd
mov eax, 1
push ebx
cmp ecx, dword [ebp - 0x4c]
adc eax, 0xffffffff
push pe_nt_image_headers32
push 3
mov dword [ebp - 0x1c], eax
push ebx
push 3
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x404ba0], eax
cmp eax, 0xffffffff
je 0x401cf6
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cdq
mov dword [0x404ba4], 0x404398
mov esi, eax
xor eax, edx
sub eax, edx
and eax, 0x7ff
xor eax, edx
sub eax, edx
cmp eax, 0x12
jle 0x401cc1
lea ecx, [eax - 0x16]
sub esi, eax
push ecx
push esi
call fcn.004027c3
add esp, 8
cmp eax, 1
je 0x401cf6
cmp eax, 2
je 0x401d28
jmp 0x401cc9
sub esi, eax
mov dword [0x404ba8], esi
mov esi, 1
push 0x7ff
mov eax, dword [0x404ba8]
sub eax, 0x800
push eax
call fcn.004027c3
add esp, 8
cmp eax, 1
je 0x401cf6
cmp eax, 2
je 0x401d28
inc esi
cmp esi, 0x22
jl 0x401cce
push 1
call fcn.004023c5
add esp, 4
mov dword [ebp - 8], 1
mov eax, dword [0x404ba0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00403203
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov byte [ecx], 0
mov esp, ebp
pop ebp
ret
mov esi, dword [0x404ba8]
push 0x16
sub esi, 0x404398
lea eax, [ebp - 0x90]
add esi, dword [0x404ba4]
push eax
call fcn.00402400
add esp, 8
test eax, eax
jne 0x401d00
mov ecx, dword [ebp - 0x84]
mov eax, 1
add ecx, dword [ebp - 0x80]
cmp word [ebp - 0x8c], ax
jne 0x401d72
cmp word [ebp - 0x8a], ax
jne 0x401d72
mov dword [ebp - 8], eax
sub esi, ecx
mov dword [ebp - 0x20], esi
jns 0x401d80
mov dword [ebp - 8], 1
test ecx, ecx
jne 0x401d91
cmp dword [ebp - 0x84], 0
je 0x401cf6
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x80]
push eax
call fcn.00402571
mov cx, word [ebp - 0x86]
add esp, 4
mov word [ebp - 2], cx
test cx, cx
je 0x401d07
xor ebx, ebx
cmp word [ebp - 2], bx
mov dword [ebp - 0x18], ebx
je 0x401eea
lea esi, [ebp - 0xbb4]
mov edi, 1
lea eax, [ebp - 0x4b4]
cmp esi, eax
jae 0x401eea
dec word [ebp - 2]
push 0xc
call fcn.00402748
add esp, 4
test eax, eax
jne 0x401cf6
push 0x2a
lea eax, [ebp - 0x78]
push eax
call fcn.00402400
add esp, 8
test eax, eax
jne 0x401d00
mov al, byte [ebp - 0x77]
cmp al, 0xe
jb 0x401e11
mov al, 0xe
test byte [ebp - 0x56], 8
movzx eax, al
mov dword [esi], eax
je 0x401e34
test eax, eax
je 0x401e2f
cmp eax, 6
je 0x401e2f
cmp eax, 0xb
je 0x401e2f
cmp eax, 5
jne 0x401e34
or dword [esi + 8], edi
jmp 0x401e38
and byte [esi + 8], 0xfe
movzx eax, word [ebp - 0x60]
push eax
push ebx
call fcn.00402400
add esp, 8
test eax, eax
jne 0x401d00
movzx eax, word [ebp - 0x5e]
push eax
push ebx
call fcn.00402400
add esp, 8
test eax, eax
jne 0x401d00
cmp word [ebp - 0x5c], bx
jne 0x401e88
movzx eax, word [ebp - 0x5c]
sub eax, 0x404398
add eax, dword [0x404ba8]
add eax, dword [0x404ba4]
push eax
call fcn.00402571
add esp, 4
mov eax, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x68]
mov edx, dword [ebp - 0x64]
mov dword [esi - 4], eax
mov dword [esi - 0xc], ecx
add dword [ebp - 0xc], edx
cmp byte [ebp - 0x75], 2
mov dword [esi - 8], edx
jne 0x401ea9
cmp byte [ebp - 0x76], 0x2a
ja 0x401edd
cmp byte [ebp - 0x76], 0x14
ja 0x401edd
cmp word [ebp - 0x72], bx
je 0x401ebc
cmp word [ebp - 0x72], 8
jne 0x401edd
test word [ebp - 0x74], di
jne 0x401edd
mov eax, dword [ebp - 0x56]
mov ecx, dword [ebp - 0x52]
and eax, 0xdf
add esi, 0x1c
or al, 0x20
inc dword [ebp - 0x18]
mov dword [esi - 0x18], eax
mov dword [esi - 0x2c], ecx
jmp 0x401ee0
mov dword [ebp - 8], edi
cmp word [ebp - 2], bx
jne 0x401dce
mov eax, dword [0x404ba8]
mov ecx, dword [0x404ba4]
mov edx, dword [0x404b9c]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x18], ebx
jle 0x40235a
lea esi, [ebp - 0xbd8]
cmp dword [ebp - 0x10], ebx
je 0x401f20
mov eax, dword [esi]
add dword [ebp - 0x14], eax
mov eax, 0x64
cmp dword [ebp - 0xc], ebx
je 0x401f42
mov ecx, 0x64
mov eax, dword [ebp - 0xc]
sub edx, edx
div ecx
mov edi, eax
sub edx, edx
mov eax, dword [ebp - 0x14]
div edi
movzx eax, ax
push eax
call fcn.004018e9
add esp, 4
mov eax, dword [esi + 0x14]
add eax, dword [ebp - 0x20]
push eax
call fcn.00402571
add esp, 4
push 0x22
call fcn.00402748
add esp, 4
test eax, eax
jne 0x401cf6
push 0x1a
lea eax, [ebp - 0x3c]
push eax
call fcn.00402400
add esp, 8
test eax, eax
jne 0x402341
test byte [ebp - 0x3a], 8
je 0x401f94
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x18]
mov dword [ebp - 0x32], eax
mov dword [ebp - 0x2e], ecx
mov eax, dword [ebp - 0x2e]
lea edx, [ebp - 0x3b4]
movzx ecx, word [ebp - 0x26]
push ecx
mov dword [0x4041f0], eax
push edx
call fcn.00402400
add esp, 8
test eax, eax
jne 0x401d00
movzx eax, word [ebp - 0x26]
movzx ecx, word [ebp - 0x24]
push ecx
mov byte [ebp + eax - 0x3b4], bl
push ebx
call fcn.00402400
add esp, 8
test eax, eax
jne 0x401d00
movzx eax, word [ebp - 0x26]
cmp byte [ebp + eax - 0x3b5], 0x2f
je 0x402348
test byte [esi + 0x2c], 1
jne 0x402348
push 0x4041fc
lea eax, [ebp - 0x1a4]
push eax
call fcn.004036ed
add esp, 8
lea eax, [ebp - 0x3b4]
lea ecx, [ebp - 0x198]
push eax
push ecx
call fcn.004036ed
add esp, 8
lea ecx, [ebp - 0x1a4]
push ecx
call fcn.00401918
add esp, 4
lea ecx, [ebp - 0x2ac]
lea edi, [ebp - 0x3b3]
mov byte [ebp - 0x1a4], bl
mov byte [ebp - 0x2ac], bl
movzx eax, byte [ebp - 0x3b4]
test eax, eax
je 0x40215b
cmp eax, 0x16
je 0x402085
cmp eax, 0x20
je 0x402090
cmp eax, 0x2f
je 0x4020a8
cmp eax, 0x5c
je 0x4020a8
cmp eax, 0x20
jb 0x40214f
cmp eax, 0xfe
ja 0x40214f
mov byte [ecx], al
inc ecx
jmp 0x40214f
mov al, byte [edi]
inc edi
mov byte [ecx], al
inc ecx
jmp 0x40214f
cmp dword [ebp - 0x1c], 0
je 0x40209f
mov byte [ecx], 0x20
inc ecx
jmp 0x40214f
mov byte [ecx], 0x5f
inc ecx
jmp 0x40214f
lea eax, [ebp - 0x2ac]
mov byte [ecx], 0
push eax
lea ecx, [ebp - 0x1a4]
cmp dword [ebp - 0x1c], 0
push ecx
je 0x4020c6
call fcn.00403711
jmp 0x4020cb
call fcn.004025d3
add esp, 8
lea eax, [ebp - 0x1a4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40212d
push 0
lea eax, [ebp - 0x1a4]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x402177
mov ecx, dword [ebp + 0x10]
lea eax, [ebp - 0x1a4]
push eax
inc dword [ebp + 0x10]
push dword [ebp + 0x10]
mov byte [ecx], 0x31
call fcn.004036ed
add esp, 8
lea ecx, [ebp - 0x1a4]
push ecx
call fcn.0040374f
add esp, 4
mov ecx, dword [ebp + 0x10]
lea edx, [eax + ecx + 1]
mov dword [ebp + 0x10], edx
jmp 0x402131
test al, 0x10
je 0x402177
push 0
lea eax, [ebp - 0x1a4]
push eax
call fcn.00403732
add esp, 8
lea ecx, [ebp - 0x2ac]
mov byte [eax], 0x2f
mov byte [eax + 1], 0
movzx eax, byte [edi]
inc edi
test eax, eax
jne 0x402055
lea eax, [ebp - 0x2ac]
mov byte [ecx], bl
push eax
lea ecx, [ebp - 0x1a4]
push ecx
cmp dword [ebp - 0x1c], ebx
je 0x40217e
call fcn.00403711
jmp 0x402183
push 3
jmp 0x402339
call fcn.004025d3
add esp, 8
lea eax, [ebp - 0x1a4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
mov edi, eax
je 0x402215
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4021ac
cmp eax, 2
je 0x402348
jmp 0x4021fc
lea eax, [ebp - 0x1a4]
lea ecx, [ebp - 0x4bc]
push eax
push ecx
call fcn.004036ed
add esp, 8
lea ecx, [ebp - 0x4c4]
push ebx
push ecx
call fcn.00403732
add esp, 8
lea edx, [ebp - 0x4c4]
mov byte [eax], 0x3f
push 4
mov byte [eax + 1], bl
mov eax, dword [0x404008]
push dword [0x40d4c4]
push edx
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
jne 0x402348
test edi, 1
je 0x402215
and edi, 0xfffffffe
lea eax, [ebp - 0x1a4]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
mov eax, dword [esi + 0x28]
mov dword [0x4041f4], 0xffffffff
and eax, 0x7f
lea ecx, [ebp - 0x1a4]
push eax
push 2
push ebx
push ebx
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x404390], eax
cmp eax, 0xffffffff
je 0x402341
mov ecx, dword [ebp + 0x10]
lea eax, [ebp - 0x1a4]
push eax
inc dword [ebp + 0x10]
push dword [ebp + 0x10]
mov byte [ecx], 0x30
call fcn.004036ed
add esp, 8
lea ecx, [ebp - 0x1a4]
push ecx
call fcn.0040374f
add esp, 4
mov ecx, dword [ebp + 0x10]
lea edx, [eax + ecx + 1]
movzx eax, word [ebp - 0x38]
mov dword [ebp + 0x10], edx
test eax, eax
je 0x4022a8
cmp eax, 8
jne 0x4022e2
call fcn.00402861
test eax, eax
je 0x4022e2
push 1
call fcn.004023c5
mov dword [ebp - 8], 1
add esp, 4
jmp 0x4022e2
cmp dword [0x4041f0], ebx
je 0x4022e2
mov edi, dword [0x4041f0]
cmp edi, 0x8000
jl 0x4022c3
mov edi, 0x8000
push edi
push 0x4054c0
call fcn.00402400
add esp, 8
push edi
call fcn.004024d5
add esp, 4
sub dword [0x4041f0], edi
jne 0x4022b0
cmp dword [0x4041f8], ebx
jne 0x401d00
lea eax, [ebp - 0x98]
push eax
push dword [ebp - 0x36]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
test eax, eax
je 0x40231a
lea eax, [ebp - 0x98]
push eax
push ebx
push ebx
push dword [0x404390]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [0x404390]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4041f4]
not eax
mov dword [0x4041f4], eax
cmp dword [ebp - 0x32], eax
je 0x402348
push 1
call fcn.004023c5
add esp, 4
mov dword [ebp - 8], 1
add esi, 0x1c
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0x18], eax
jg 0x401f16
cmp dword [ebp - 0x10], ebx
je 0x40236f
mov eax, dword [ebp - 0x10]
imul eax, eax, 0x1c
mov ecx, dword [ebp + eax - 0xbd8]
add dword [ebp - 0x14], ecx
mov eax, 0x64
cmp dword [ebp - 0xc], ebx
je 0x402391
mov ecx, 0x64
mov eax, dword [ebp - 0xc]
sub edx, edx
div ecx
mov esi, eax
sub edx, edx
mov eax, dword [ebp - 0x14]
div esi
movzx eax, ax
push eax
call fcn.004018e9
add esp, 4
push dword [ebp - 0x48]
call fcn.004026f7
add esp, 4
mov eax, dword [ebp - 0x44]
cmp word [ebp - 2], bx
mov ecx, dword [ebp - 0x40]
mov dword [0x404ba4], eax
mov dword [0x404b9c], ecx
jne 0x401db6
jmp 0x401d07