Function at 0x4012e0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xd24
mov eax, dword [0x40d204]
push ebx
push esi
push edi
xor ebx, ebx
push ebx
mov dword [esp + 0xd30], eax
mov eax, dword [0x40d8a0]
push 1
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_EnableWindow]
mov ecx, dword [0x40d8a0]
mov esi, dword [sym.imp.USER32.dll_SendDlgItemMessageA]
push ebx
push ebx
push 0x147
push 0x3e9
push ecx
call esi
cmp eax, ebx
mov dword [esp + 0x1c], eax
jge 0x40133a
mov dword [esp + 0x1c], ebx
mov edx, dword [0x40d8a0]
push ebx
push ebx
push 0x14b
push 0x3e9
push edx
call esi
push 0x12c
lea eax, [esp + 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x12c
lea ecx, [esp + 0x42c]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
xor eax, eax
mov ecx, 0x1f4
lea edi, [esp + 0x558]
rep stosd dword es:[edi], eax
call fcn.004025d0
mov edi, eax
cmp edi, ebx
mov dword [esp + 0x14], edi
jge 0x40139b
mov dword [esp + 0x14], ebx
mov edi, ebx
xor eax, eax
cmp edi, ebx
mov dword [esp + 0x18], eax
jle 0x40158e
lea esp, [esp]
lea edx, [esp + 0x558]
push edx
push eax
call fcn.00403550
add esp, 8
test eax, eax
je 0x40157d
cmp dword [esp + 0xa84], 0x200
jne 0x40157d
lea eax, [esp + 0x685]
push str.USBSTOR_
push eax
call fcn.004041a0
lea ecx, [esp + 0x68d]
add esp, 8
cmp eax, ecx
jne 0x40157d
xor bl, bl
mov byte [esp + 0x10], bl
mov byte [esp + 0x11], bl
xor eax, eax
lea ecx, [esp + 0xcac]
cmp byte [ecx], 0
jne 0x401421
inc eax
add ecx, 0x20
cmp eax, 4
jl 0x401411
jmp 0x40142f
shl eax, 5
mov bl, byte [esp + eax + 0xcac]
mov byte [esp + 0x10], bl
xor eax, eax
mov cl, byte [esp + eax + 0x559]
mov byte [esp + eax + 0x40], cl
inc eax
test cl, cl
jne 0x401431
cmp dword [esp + 0xa78], 0xb
jne 0x40157d
mov eax, dword [esp + 0xa8c]
mov ecx, dword [esp + 0xa88]
push 0xa
lea edx, [esp + 0x24]
push edx
push 0
push 0xf4240
push eax
push ecx
call fcn.00404230
push eax
call fcn.00409006
lea edi, [esp + 0x4c]
add esp, 0xc
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401480
mov dx, word [0x40a1f8]
lea eax, [esp + 0x20]
mov word [edi], dx
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401498
lea edi, [esp + 0x40]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4014a6
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x40]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4014c3
test bl, bl
mov ax, word [0x40a1f4]
mov cl, byte [0x40a1f6]
mov word [edi], ax
mov byte [edi + 2], cl
je 0x401541
lea edi, [esp + 0x40]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4014e6
mov dx, word [0x40a1f0]
mov al, byte [0x40a1f2]
mov word [edi], dx
mov byte [edi + 2], al
lea eax, [esp + 0x10]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401506
lea edi, [esp + 0x40]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401514
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x40]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401531
mov ecx, dword [0x40a1ec]
mov dword [edi], ecx
mov eax, dword [0x40d8a0]
mov esi, dword [sym.imp.USER32.dll_SendDlgItemMessageA]
lea edx, [esp + 0x40]
push edx
push 0
push 0x143
push 0x3e9
push eax
call esi
mov ecx, dword [esp + 0x18]
mov edx, dword [0x40d8a0]
push ecx
push eax
push 0x151
push 0x3e9
push edx
call esi
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
inc eax
cmp eax, edi
mov dword [esp + 0x18], eax
jl 0x4013b0
mov eax, dword [esp + 0x1c]
mov ecx, dword [0x40d8a0]
push 0
push eax
push 0x14e
push 0x3e9
push ecx
call esi
mov edx, dword [0x40d8a0]
push 0
push 0
push 0x147
push 0x3e9
push edx
call esi
cmp eax, 0xffffffff
jle 0x4015f3
mov eax, dword [0x40d8a0]
push 1
push 1
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_EnableWindow]
call fcn.004010e0
mov ecx, dword [esp + 0xd2c]
call fcn.00403e52
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x40d8a0]
push str.____No_USB_Disks_Found_
push 0
push 0x143
push 0x3e9
push ecx
call esi
mov edx, dword [0x40d8a0]
push 0
push 0
push 0x14e
push 0x3e9
push edx
call esi
mov eax, dword [0x40d8a0]
push 0xffffffffffffffff
push 0
push 0x151
push 0x3e9
push eax
call esi
call fcn.004010e0
mov ecx, dword [esp + 0xd2c]
call fcn.00403e52
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret