Function at 0x405a20
Capabilities:
Get disk information
Get file size
Read .ini file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4764
call fcn.00419e90
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.0040bcd0
add esp, 0xc
lea eax, [ebp - 0x218]
push str.Setup.ini
push 0x42520c
push 0x420870
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 0x405ac9
lea eax, [ebp - 0x218]
push eax
push str._0x00020001_
push 0x30
push str.file_open_error
push dword [0x425188]
call fcn.0040a9a0
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040aa0f
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.0040d129
add esp, 4
mov dword [ebp - 0x4750], eax
test eax, eax
jne 0x405b2a
lea eax, [ebp - 0x218]
push eax
push str._0x00020002_
push 0x30
push str.memory_allocate_error
push dword [0x425188]
call fcn.0040a9a0
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.0040aa0f
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 0x405b8e
lea eax, [ebp - 0x218]
push eax
push str._0x00020003_
push 0x30
push str.read_error
push dword [0x425188]
call fcn.0040a9a0
add esp, 0x14
push edi
call fcn.0040d124
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.0040aa0f
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x421228
push edi
call fcn.0040b880
add esp, 8
test eax, eax
je 0x405eb1
push 0x421228
push edi
call fcn.0040b880
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.004052c0
test eax, eax
je 0x405ec9
mov al, byte [ebx + edi]
xorps xmm0, xmm0
movlpd qword [ebp - 0x4758], xmm0
cmp al, 0x45
je 0x405e44
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 0x405c32
inc ebx
mov byte [ebp + ecx - 0x110], al
inc ecx
mov al, byte [ebx + edi]
cmp al, 0x3b
jne 0x405c16
cmp ecx, 0x104
jae 0x405ee5
mov byte [ebp + ecx - 0x110], 0
nop word [eax + eax]
mov al, byte [ebx + edi]
inc ebx
cmp al, 0xa
jne 0x405c40
movsx eax, byte [ebp - 0x110]
add eax, 0xffffffbd
cmp eax, 0x23
ja case.0x405c62.69
movzx eax, byte [eax + 0x405efc]
jmp dword [eax*4 + 0x405eec]
push edx
push dword [ebp - 0x474c]
lea edx, [ebp - 0x4740]
lea ecx, [ebp - 0x110]
call fcn.00405460
mov ecx, eax
add esp, 8
or ecx, edx
je 0x405ec9
add dword [ebp - 0x474c], eax
adc dword [ebp - 0x4744], edx
jmp 0x405e33
mov dl, 0x44
lea ecx, [ebp - 0x10e]
call fcn.00404990
lea eax, [ebp - 0x10e]
push eax
push 0x425854
lea eax, [ebp - 0x218]
push 0x420870
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 0x405e33
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x405e33
push edi
call fcn.0040d124
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.0040aa0f
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 0x405df1
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 0x405deb
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 0x405deb
push eax
lea eax, [ebp - 0x10e]
push eax
lea eax, [ebp - 0x428]
push eax
call fcn.0040d270
add esp, 0xc
test eax, eax
je 0x405e27
mov eax, dword [ebp - 0x4748]
inc esi
add edi, edi
cmp esi, 0x7a
jle 0x405d60
mov esi, dword [sym.imp.USER32.dll_MessageBoxA]
push 1
push 0x42564c
push 0x421298
push dword [0x425188]
call esi
cmp eax, 2
je 0x405e7b
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
jmp case.0x405c62.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 0x405c10
mov eax, dword [0x425524]
push dword [eax*8 + 0x42552c]
push dword [eax*8 + 0x425528]
call fcn.00404b20
push edi
call fcn.0040d124
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040aa0f
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x4750]
push eax
call fcn.0040d124
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.0040aa0f
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.0040d124
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.0040aa0f
mov esp, ebp
pop ebp
ret
call fcn.0040ab41
nop
xor byte [ebp + 0x40], bl
add byte [edi + 1761624156], bl
pop esp
inc eax
add byte [ecx], bh
pop esi
inc eax
add byte [eax], al
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