Function at 0x408c40
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x4b0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0
xorps xmm0, xmm0
movaps xmmword [esp + 0x90], xmm0
movaps xmmword [esp + 0x80], xmm0
movaps xmmword [esp + 0x70], xmm0
mov dword [esp + 0x90], 0xffffffff
lea edi, [esp + 0xa4]
push 0x408
push 0
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov ecx, edi
call fcn.00428df0
mov edi, dword [0x5aa310]
lea ebx, [esp + 0x18]
push dword [ebp + 8]
push 0x578cb9
push ebx
call fcn.00427900
add esp, 0xc
mov eax, dword [edi]
lea edx, [esp + 0x28]
mov ecx, edi
push 0
push edx
push ebx
call dword [eax + 0x14]
mov edi, eax
test byte [esp + 0x18], 1
je 0x408cff
push dword [esp + 0x20]
call fcn.004203b0
add esp, 4
mov esi, dword [ebp + 0xc]
mov ebx, str.Cant_determine_partition_type._n
test edi, edi
jne 0x408e1f
mov eax, dword [ebp + 0x10]
movzx ebx, byte [eax]
test bl, 1
je 0x408d1f
mov ecx, dword [eax + 4]
jmp 0x408d23
mov ecx, ebx
shr ecx, 1
test ecx, ecx
mov esi, dword [ebp + 8]
je 0x408dd2
movzx edx, byte [esp + 0x28]
mov eax, edx
shr eax, 1
test dl, 1
mov edi, dword [esp + 0x2c]
mov esi, edi
cmove esi, eax
cmp esi, ecx
mov esi, dword [ebp + 8]
jne 0x408d78
mov ecx, dword [ebp + 0x10]
test bl, 1
je 0x409011
mov ecx, dword [ecx + 8]
test dl, 1
je 0x40901b
test edi, edi
je 0x408dc6
push edi
push ecx
push dword [esp + 0x38]
call sub.api_ms_win_crt_private_l1_1_0.dll_memcmp
add esp, 0xc
test eax, eax
je 0x408dc6
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
test byte [esi], 1
je 0x408d8d
mov ecx, dword [esi + 8]
jmp 0x408d90
lea ecx, [esi + 1]
test byte [esp + 0x28], 1
mov esi, dword [ebp + 0x10]
je 0x408da6
mov edx, dword [esp + 0x30]
test byte [esi], 1
jne 0x408daf
inc esi
jmp 0x408db2
lea edx, [esp + 0x29]
test byte [esi], 1
je 0x408da3
mov esi, dword [esi + 8]
push esi
push edx
push ecx
push str.Warning:__s_type_is__s__but__s_was_requested_for_formatting._n
push eax
call fcn.004018e0
add esp, 0x14
mov esi, dword [ebp + 8]
lea ecx, [esp + 0x28]
push dword [ebp + 0x10]
call fcn.004238c0
mov edi, dword [0x5aa310]
push esi
push 0x578d28
lea ebx, [esp + 0x20]
push ebx
call fcn.00427900
add esp, 0xc
mov eax, dword [edi]
lea edx, [esp + 8]
mov ecx, edi
push 0
push edx
push ebx
call dword [eax + 0x14]
mov edi, eax
test byte [esp + 0x18], 1
je 0x408e0f
push dword [esp + 0x20]
call fcn.004203b0
add esp, 4
mov ebx, str.Unable_to_get_partition_size_n
test edi, edi
mov esi, dword [ebp + 0xc]
je 0x408f6d
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
mov edi, eax
test esi, esi
je 0x40939a
push str.Erase_successful__but_not_automatically_formatting._n
push edi
call fcn.004018e0
add esp, 8
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push 2
call esi
add esp, 4
push ebx
push 0x578ec4
push eax
call fcn.004018e0
add esp, 0xc
push 2
call esi
add esp, 4
mov esi, eax
lea ecx, [esp + 0x18]
push dword [0x5aa310]
call fcn.004793a0
test byte [esp + 0x18], 1
je 0x408e83
mov eax, dword [esp + 0x20]
jmp 0x408e87
lea eax, [esp + 0x19]
push eax
push str.FAILED___s__n
push esi
call fcn.004018e0
add esp, 0xc
test byte [esp + 0x18], 1
je 0x408ea9
push dword [esp + 0x20]
call fcn.004203b0
add esp, 4
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call esi
mov edi, dword [eax]
call esi
mov dword [eax], edi
lea ecx, [esp + 0xa4]
call fcn.004293c0
call esi
mov esi, dword [eax]
mov eax, dword [esp + 0x90]
cmp eax, 0xffffffff
je 0x408edc
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll__close
add esp, 4
mov dword [esp + 0x90], 0xffffffff
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], esi
mov esi, dword [esp + 0x78]
test esi, esi
je 0x408f3f
mov edi, dword [esp + 0x7c]
mov eax, esi
cmp edi, esi
jne 0x408f17
jmp 0x408f32
add edi, 0xfffffff8
cmp edi, esi
je 0x408f2e
mov eax, dword [edi - 8]
mov dword [edi - 8], 0
test eax, eax
je 0x408f10
push eax
call dword [edi - 4]
add esp, 4
jmp 0x408f10
mov eax, dword [esp + 0x78]
mov dword [esp + 0x7c], esi
push eax
call fcn.004203b0
add esp, 4
test byte [esp + 8], 1
je 0x408f52
push dword [esp + 0x10]
call fcn.004203b0
add esp, 4
test byte [esp + 0x28], 1
je 0x408f65
push dword [esp + 0x30]
call fcn.004203b0
add esp, 4
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp + 8]
mov dword [esp + 0x3c], eax
mov eax, dword [ebp + 0x14]
movzx ecx, byte [eax]
test cl, 1
je 0x408f8b
mov esi, dword [eax + 4]
test esi, esi
jne 0x408f97
jmp 0x40907b
mov esi, ecx
shr esi, 1
test esi, esi
je 0x40907b
movzx edx, byte [esp + 8]
mov eax, edx
shr eax, 1
test dl, 1
mov edi, dword [esp + 0xc]
mov ebx, edi
cmove ebx, eax
cmp ebx, esi
mov esi, dword [ebp + 0x14]
jne 0x408fe6
test cl, 1
je 0x40936b
mov ecx, dword [esi + 8]
test dl, 1
je 0x409377
test edi, edi
je 0x409071
push edi
push ecx
push dword [esp + 0x18]
call sub.api_ms_win_crt_private_l1_1_0.dll_memcmp
add esp, 0xc
test eax, eax
je 0x409071
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
mov ecx, dword [ebp + 8]
test byte [ecx], 1
je 0x409048
mov ecx, dword [ecx + 8]
test byte [esp + 8], 1
jne 0x409050
lea edx, [esp + 9]
test byte [esi], 1
jne 0x409059
mov edi, esi
inc esi
jmp 0x40905e
inc ecx
test dl, 1
jne 0x408d62
cmp dl, 2
jb 0x408dc6
xor edx, edx
nop word cs:[eax + eax]
movzx ebx, byte [esp + edx + 0x29]
cmp bl, byte [ecx + edx]
jne 0x408d78
inc edx
cmp eax, edx
jne 0x409030
jmp 0x408dc6
inc ecx
test byte [esp + 8], 1
je 0x409003
mov edx, dword [esp + 0x10]
test byte [esi], 1
je 0x40900c
mov edi, esi
mov esi, dword [esi + 8]
push esi
push edx
push ecx
push str.Warning:__s_size_is__s__but__s_was_requested_for_formatting._n
push eax
call fcn.004018e0
add esp, 0x14
mov esi, edi
lea ecx, [esp + 8]
push esi
call fcn.004238c0
lea edi, [esp + 0x64]
mov ecx, edi
lea eax, [esp + 8]
push eax
call fcn.00423570
push edi
lea eax, [esp + 0x1c]
push eax
call fcn.00428c50
add esp, 8
test byte [esp + 8], 1
je 0x4090c2
mov eax, dword [esp + 0x10]
mov byte [eax], 0
mov dword [esp + 0xc], 0
test byte [esp + 8], 1
je 0x4090c2
push dword [esp + 0x10]
call fcn.004203b0
add esp, 4
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], eax
movsd xmm0, qword [esp + 0x18]
movsd qword [esp + 8], xmm0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 0
test byte [esp + 0x64], 1
mov esi, dword [ebp + 0xc]
je 0x409104
push dword [esp + 0x6c]
call fcn.004203b0
add esp, 4
lea eax, [esp + 0x28]
push eax
call fcn.0048cbc0
add esp, 4
test eax, eax
je 0x40931c
mov dword [esp + 0x48], eax
test byte [esp + 8], 1
lea edi, [esp + 9]
mov dword [esp + 0x38], edi
je 0x409130
mov edi, dword [esp + 0x10]
dec edi
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isspace]
nop word [eax + eax]
movsx ebx, byte [edi + 1]
inc edi
push ebx
call esi
add esp, 4
test eax, eax
jne 0x409140
mov esi, 0xa
cmp bl, 0x30
jne 0x409175
movzx eax, byte [edi + 1]
mov esi, 0x10
cmp al, 0x78
je 0x409175
cmp al, 0x58
mov eax, 0x10
mov esi, 0xa
cmove esi, eax
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call ebx
mov dword [eax], 0
mov dword [esp + 0x18], 0
push esi
lea eax, [esp + 0x1c]
push eax
push edi
call fcn.0047c4f0
add esp, 0xc
mov esi, eax
mov dword [esp + 0x44], edx
call ebx
cmp dword [eax], 0
jne 0x4093e8
mov eax, dword [esp + 0x18]
cmp edi, eax
je 0x4093dc
cmp byte [eax], 0
jne 0x4093dc
push 0x20
call fcn.00420210
add esp, 4
mov dword [esp + 0x60], eax
mov dword [esp + 0x58], 0x21
mov dword [esp + 0x5c], 0x10
movups xmm0, xmmword [str.erase_block_size]
movups xmmword [eax], xmm0
mov byte [eax + 0x10], 0
lea ecx, [esp + 0x58]
call fcn.00409480
mov dword [esp + 0x38], eax
test byte [esp + 0x58], 1
je 0x40920c
push dword [esp + 0x60]
call fcn.004203b0
add esp, 4
mov ebx, esi
push 0x20
call fcn.00420210
add esp, 4
mov dword [esp + 0x54], eax
mov dword [esp + 0x4c], 0x21
mov dword [esp + 0x50], 0x12
movups xmm0, xmmword [str.logical_block_size]
movups xmmword [eax], xmm0
mov word [eax + 0x10], 0x657a
mov byte [eax + 0x12], 0
lea ecx, [esp + 0x4c]
call fcn.00409480
mov edi, eax
test byte [esp + 0x4c], 1
je 0x40925e
push dword [esp + 0x54]
call fcn.004203b0
add esp, 4
lea esi, [esp + 0xa8]
push dword [ebp + 0x18]
push edi
push dword [esp + 0x40]
push dword [esp + 0x50]
push ebx
push esi
push dword [esp + 0x60]
call fcn.0048cc40
add esp, 0x1c
test eax, eax
jne 0x409405
push 0
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll__open
add esp, 8
mov edi, eax
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call ebx
mov esi, dword [eax]
call ebx
mov dword [eax], esi
call ebx
mov esi, dword [eax]
cmp edi, 0xffffffff
je 0x409416
mov dword [esp + 0x40], edi
call ebx
mov dword [eax], esi
lea ecx, [esp + 0x40]
lea edi, [esp + 0x70]
mov edx, edi
push dword [ebp + 0x1c]
call fcn.004043d0
add esp, 4
mov ecx, ebx
mov ebx, eax
call ecx
mov esi, dword [eax]
mov eax, dword [esp + 0x40]
cmp eax, 0xffffffff
je 0x4092e6
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll__close
add esp, 4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], esi
test bl, bl
je 0x40942a
mov eax, dword [ebp + 0x1c]
mov ebx, dword [eax + 4]
mov esi, dword [ebp + 8]
mov ecx, esi
call fcn.004086c0
movzx eax, al
mov ecx, ebx
mov edx, esi
push eax
push edi
call fcn.00404780
add esp, 8
jmp 0x408ea9
test esi, esi
je 0x409445
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push 2
call esi
add esp, 4
push str.Erase_successful__but_not_automatically_formatting._n
push eax
call fcn.004018e0
add esp, 8
push 2
call esi
add esp, 4
test byte [esp + 0x28], 1
je 0x409353
mov ecx, dword [esp + 0x30]
jmp 0x409357
lea ecx, [esp + 0x29]
push ecx
push str.File_system_type__s_not_supported._n
push eax
call fcn.004018e0
add esp, 0xc
jmp 0x408ea9
lea ecx, [esi + 1]
test dl, 1
jne 0x408fc8
cmp dl, 2
jb 0x409071
xor edx, edx
movzx ebx, byte [esp + edx + 9]
cmp bl, byte [ecx + edx]
jne 0x408fe6
inc edx
cmp eax, edx
jne 0x409382
jmp 0x409071
lea esi, [esp + 0x18]
mov ecx, esi
push dword [0x5aa310]
call fcn.004793a0
test byte [esp + 0x18], 1
je 0x4093b8
mov eax, dword [esp + 0x20]
jmp 0x4093bc
lea eax, [esp + 0x19]
push eax
push str.FAILED___s__n
push edi
call fcn.004018e0
add esp, 0xc
mov ecx, esi
call fcn.00423880
push str.Command_failed
call fcn.004286b0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x16
test byte [esp + 8], 1
je 0x4093f7
mov eax, dword [esp + 0x10]
mov dword [esp + 0x38], eax
push dword [esp + 0x38]
push str.Couldnt_parse_partition_size__s.
call fcn.004286b0
mov eax, dword [ebp + 8]
test byte [eax], 1
je 0x409452
mov eax, dword [eax + 8]
mov dword [esp + 0x3c], eax
jmp 0x409456
push esi
call sub.api_ms_win_crt_runtime_l1_1_0.dll_strerror
add esp, 4
push eax
push str.Cannot_open_generated_image:__s
call fcn.004286b0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call sub.api_ms_win_crt_runtime_l1_1_0.dll_strerror
add esp, 4
push eax
push str.Cannot_read_image:__s
call fcn.004286b0
test byte [esp + 0x28], 1
je 0x409464
mov eax, dword [esp + 0x30]
jmp 0x409468
inc dword [esp + 0x3c]
push dword [esp + 0x3c]
push str.Cannot_generate_image_for__s
call fcn.004286b0
lea eax, [esp + 0x29]
push eax
push str.Formatting_is_not_supported_for_file_system_with_type__s.
call fcn.004286b0
nop word cs:[eax + eax]