Function at 0x4058a0
Capabilities:
Create directory
Get disk information
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4764
call fcn.00419d10
mov eax, dword [0x424008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x4210
lea eax, [ebp - 0x4740]
push 0
push eax
call fcn.0040bb50
add esp, 0xc
lea eax, [ebp - 0x218]
push str.Setup.ini
push 0x42520c
push 0x42086c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x218]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x405949
lea eax, [ebp - 0x218]
push eax
push str._0x00020001_
push 0x30
push str.file_open_error
push dword [0x425188]
call fcn.0040a820
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a88f
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x475c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea ecx, [edi + 1]
push ecx
call fcn.0040cfa9
add esp, 4
mov dword [ebp - 0x4750], eax
test eax, eax
jne 0x4059aa
lea eax, [ebp - 0x218]
push eax
push str._0x00020002_
push 0x30
push str.memory_allocate_error
push dword [0x425188]
call fcn.0040a820
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a88f
mov esp, ebp
pop ebp
ret
push 0
mov byte [eax + edi], 0
lea eax, [ebp - 0x4760]
push eax
push edi
mov edi, dword [ebp - 0x4750]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x405a0e
lea eax, [ebp - 0x218]
push eax
push str._0x00020003_
push 0x30
push str.read_error
push dword [0x425188]
call fcn.0040a820
add esp, 0x14
push edi
call fcn.0040cfa4
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a88f
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x421228
push edi
call fcn.0040b700
add esp, 8
test eax, eax
je 0x405d31
push 0x421228
push edi
call fcn.0040b700
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 8
mov ebx, eax
sub ebx, edi
push str._script__r_n
call esi
lea edx, [ebp - 0x4740]
mov ecx, edi
add ebx, eax
call fcn.00405140
test eax, eax
je 0x405d49
mov al, byte [ebx + edi]
xorps xmm0, xmm0
movlpd qword [ebp - 0x4758], xmm0
cmp al, 0x45
je 0x405cc4
mov edx, dword [ebp - 0x4754]
mov ecx, dword [ebp - 0x4758]
mov dword [ebp - 0x4744], edx
mov dword [ebp - 0x474c], ecx
nop
xor ecx, ecx
cmp al, 0x3b
je 0x405ab2
inc ebx
mov byte [ebp + ecx - 0x110], al
inc ecx
mov al, byte [ebx + edi]
cmp al, 0x3b
jne 0x405a96
cmp ecx, 0x104
jae 0x405d65
mov byte [ebp + ecx - 0x110], 0
nop word [eax + eax]
mov al, byte [ebx + edi]
inc ebx
cmp al, 0xa
jne 0x405ac0
movsx eax, byte [ebp - 0x110]
add eax, 0xffffffbd
cmp eax, 0x23
ja case.0x405ae2.69
movzx eax, byte [eax + 0x405d7c]
jmp dword [eax*4 + 0x405d6c]
push edx
push dword [ebp - 0x474c]
lea edx, [ebp - 0x4740]
lea ecx, [ebp - 0x110]
call fcn.004052e0
mov ecx, eax
add esp, 8
or ecx, edx
je 0x405d49
add dword [ebp - 0x474c], eax
adc dword [ebp - 0x4744], edx
jmp 0x405cb3
mov dl, 0x44
lea ecx, [ebp - 0x10e]
call fcn.00404810
lea eax, [ebp - 0x10e]
push eax
push 0x425854
lea eax, [ebp - 0x218]
push 0x42086c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x218]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x405cb3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x405cb3
push edi
call fcn.0040cfa4
add esp, 4
lea eax, [ebp - 0x218]
push 0x30
push eax
push 0x421278
push dword [0x425188]
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a88f
mov esp, ebp
pop ebp
ret
mov edi, 1
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov dword [ebp - 0x4748], eax
lea eax, [ebp - 0x10e]
push eax
call esi
mov dword [ebp - 0x4754], eax
lea esi, [edi + 0x60]
mov eax, dword [ebp - 0x4748]
nop dword [eax]
test edi, eax
je 0x405c71
push esi
lea eax, [ebp - 0x320]
push str._c:_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x320]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 5
jne 0x405c6b
push 0x104
lea eax, [ebp - 0x530]
push eax
push 0
push 0
push 0
push 0x104
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x320]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, dword [ebp - 0x4754]
jne 0x405c6b
push eax
lea eax, [ebp - 0x10e]
push eax
lea eax, [ebp - 0x428]
push eax
call fcn.0040d0f0
add esp, 0xc
test eax, eax
je 0x405ca7
mov eax, dword [ebp - 0x4748]
inc esi
add edi, edi
cmp esi, 0x7a
jle 0x405be0
mov esi, dword [sym.imp.USER32.dll_MessageBoxA]
push 1
push 0x42564c
push 0x421298
push dword [0x425188]
call esi
cmp eax, 2
je 0x405cfb
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
jmp case.0x405ae2.67
mov edi, dword [ebp - 0x4750]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [ebp - 0x4744]
mov al, byte [ebx + edi]
cmp al, 0x45
jne 0x405a90
mov eax, dword [0x425524]
push dword [eax*8 + 0x42552c]
push dword [eax*8 + 0x425528]
call fcn.004049a0
push edi
call fcn.0040cfa4
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a88f
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x4750]
push eax
call fcn.0040cfa4
add esp, 4
push 0
push 0x42564c
push 0x4212b8
push dword [0x425188]
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a88f
mov esp, ebp
pop ebp
ret
push 0x30
push str.script_error
push str._script_
push dword [0x425188]
call dword [sym.imp.USER32.dll_MessageBoxA]
push edi
call fcn.0040cfa4
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.0040a88f
mov esp, ebp
pop ebp
ret
call fcn.0040a9c1
nop
mov al, 0x5b
inc eax
add byte [edi], bl
pop ebx
inc eax
add cl, ch
pop edx
inc eax
add byte [ecx + 0x405c], bh
add dword [ebx], eax
add al, byte [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [eax]
add dword [ebx], eax
add dl, byte [ebp - 117]
push ebp
mov ebp, esp