Function at 0x40c6e1
Capabilities:
Extract resource via kernel32 functions
Get disk information
Get disk size
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
sub esp, 0x60
xor esi, esi
xor edi, edi
mov ecx, 0x1d
push esi
dec ecx
jne 0x40c6f3
push 0
push 0
push 0x14b
push dword [0x414f00]
call dword [sym.imp.USER32.DLL_SendMessageA]
call fcn.00412623
mov edx, 0x41527c
call fcn.00412cca
sub esp, 4
mov ebx, esp
call fcn.00412354
push dword [0x414f00]
call fcn.0040882d
push 1
call dword [sym.imp.KERNEL32.DLL_SetErrorMode]
call fcn.00412623
mov esi, eax
mov eax, dword [0x414a68]
mov dword [ebp - 0xbc], eax
cmp dword [ebp - 0xbc], 0
je 0x40cbaf
push 0xa
push 1
push dword [ebp - 0xbc]
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
call fcn.00412623
mov dword [ebp - 0xcc], eax
fld1
fchs
mov eax, dword [ebp - 0xcc]
call fcn.00411922
fcompp
fnstsw ax
sahf
je 0x40c7c7
push dword [ebp - 0xcc]
push dword [ebp - 0xbc]
call dword [sym.imp.KERNEL32.DLL_LoadResource]
call fcn.00412623
mov dword [ebp - 0xd0], eax
push dword [ebp - 0xcc]
push dword [ebp - 0xbc]
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
call fcn.00412623
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp - 0xd0]
mov ebx, dword [ebp - 0xd4]
call fcn.00411f45
mov ecx, 9
mov eax, 0x7fffffff
call fcn.004100fb
lea ebx, [ebp - 0xc8]
call fcn.004122e1
mov eax, dword [ebp - 0xd0]
mov ebx, dword [ebp - 0xd4]
call fcn.00411f45
mov ecx, 1
mov eax, 8
call fcn.004100fb
mov eax, 1
call fcn.0040f2ec
fistp dword [ebp - 0xd8]
mov eax, dword [ebp - 0xd8]
mov dword [0x414f0c], eax
cmp dword [ebp - 0xd8], 1
jle 0x40cbaf
fild word [0x415eb8]
fidivr dword [ebp - 0xd8]
call fcn.00411fbf
call fcn.004121bc
call fcn.0041203d
call fcn.0041208e
mov edx, 0x415293
call fcn.00412cca
call fcn.00412510
sub esp, 4
mov ebx, esp
call fcn.00412354
push dword [0x414ed0]
call fcn.0040957c
mov edx, dword [ebp - 0xc8]
call fcn.00412cb6
mov edx, 0x41529c
call fcn.00412cca
mov edx, dword [ebp - 0xc8]
call fcn.00412cb6
mov edx, 0x41529c
call fcn.00412cca
call fcn.004136b8
call fcn.0041373f
lea ebx, [ebp - 0xc8]
call fcn.004122e1
mov edx, dword [ebp - 0xc8]
call fcn.00412cb6
mov edx, 0x415026
call fcn.00412cca
mov eax, 1
call fcn.0041373f
lea ebx, [ebp - 0xc8]
call fcn.004122e1
mov edx, dword [ebp - 0xc8]
call fcn.00412cb6
sub esp, 4
mov ebx, esp
call fcn.00412354
push dword [0x414ee8]
call fcn.0040957c
call dword [sym.imp.KERNEL32.DLL_GetLogicalDrives]
call fcn.00412623
mov dword [0x414f04], eax
mov edi, 0
mov eax, 1
mov ecx, edi
xchg ecx, eax
mov ebx, 0x414f04
call fcn.004123db
cmp eax, ecx
jne 0x40cba4
cmp edi, 2
je 0x40cba4
push 0
mov eax, edi
add eax, 0x41
call fcn.0040f222
call fcn.0040f1bb
mov edx, 0x41529f
call fcn.00412cca
call fcn.00412510
lea ebx, [ebp - 0x88]
call fcn.004122e1
sub esp, 4
mov edx, dword [ebp - 0x88]
call fcn.00412cb6
mov ebx, esp
call fcn.00412393
call dword [sym.imp.KERNEL32.DLL_GetDriveTypeA]
push eax
mov ebx, esp
mov eax, dword [ebx + 4]
call fcn.00411f3d
pop eax
add esp, 4
call fcn.00412623
mov word [ebp - 0x8c], ax
mov eax, 2
movsx ecx, word [ebp - 0x8c]
cmp ecx, eax
je 0x40c9ef
fild word [0x415ec4]
ficomp word [ebp - 0x8c]
fnstsw ax
sahf
mov ax, 0xffff
je 0x40c9ce
inc ax
call fcn.00411910
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
call fcn.00411922
call fcn.0041226b
ftst
fnstsw ax
sahf
fstp st(0)
je 0x40cba4
push 0xffffffffffffffff
sub esp, 4
mov edx, dword [ebp - 0x88]
call fcn.00412cb6
mov ebx, esp
call fcn.00412393
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
push eax
mov ebx, esp
mov eax, dword [ebx + 4]
call fcn.00411f3d
pop eax
add esp, 4
call fcn.00412623
pop dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x2c]
je 0x40cba4
sub esp, 4
lea ebx, [ebp - 0xa4]
push ebx
lea ebx, [ebp - 0x9c]
push ebx
lea ebx, [ebp - 0x94]
push ebx
mov edx, dword [ebp - 0x88]
call fcn.00412cb6
mov ebx, esp
add ebx, 0xc
call fcn.00412393
call dword [sym.imp.KERNEL32.DLL_GetDiskFreeSpaceExA]
push eax
mov ebx, esp
mov eax, dword [ebx + 4]
call fcn.00411f3d
pop eax
add esp, 4
call fcn.00412623
fild word [0x415eb8]
lea ebx, [ebp - 0x9c]
mov eax, ebx
mov ebx, 8
call fcn.00411f45
mov eax, 1
call fcn.0040f2ec
fdivrp st(1)
fidiv word [0x415eb8]
call fcn.00411fbf
call fcn.004121bc
lea ebx, [ebp - 0xac]
call fcn.004122e1
fild word [0x415eb8]
lea ebx, [ebp - 0xa4]
mov eax, ebx
mov ebx, 8
call fcn.00411f45
mov eax, 1
call fcn.0040f2ec
fdivrp st(1)
fidiv word [0x415eb8]
call fcn.00411fbf
call fcn.004121bc
lea ebx, [ebp - 0xa8]
call fcn.004122e1
fild word [0x415ec8]
fild word [0x415eb8]
lea ebx, [ebp - 0x9c]
mov eax, ebx
mov ebx, 8
call fcn.00411f45
mov eax, 1
call fcn.0040f2ec
fdivrp st(1)
fidiv word [0x415eb8]
fidiv word [0x415eb8]
call fcn.00411fbf
fcompp
fnstsw ax
sahf
jae 0x40cba4
mov edx, dword [ebp - 0x88]
call fcn.00412cb6
mov edx, 0x415023
call fcn.00412cca
call fcn.00412510
mov edx, dword [ebp - 0xac]
call fcn.00412cb6
call fcn.00412510
mov edx, 0x4152a3
call fcn.00412cca
call fcn.00412510
mov edx, dword [ebp - 0xa8]
call fcn.00412cb6
call fcn.00412510
mov edx, 0x4152b3
call fcn.00412cca
call fcn.00412510
sub esp, 4
mov ebx, esp
call fcn.00412354
push dword [0x414f00]
call fcn.0040882d
inc edi
cmp edi, 0x19
jle 0x40c91f
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.DLL_SetErrorMode]
call fcn.00412623
push 0
push dword [0x414f00]
call fcn.00408a34
mov ebx, fcn.0040c6e1
call fcn.00412bf6
mov eax, dword [ebp - 0x7c]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret 4