Function at 0x4014c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
xor edi, edi
call fcn.00401fc0
nop word cs:[eax + eax]
push 0x40926c
push esi
push ebx
call fcn.00403310
add esp, 0xc
cmp eax, 0x7a
jne 0x4014f9
or edi, 1
jmp 0x4014e0
cmp eax, 0xffffffff
jne 0x4015bb
mov eax, dword [0x4095bc]
xor edx, edx
mov ecx, dword [eax]
mov eax, 0
cmp ecx, ebx
jge 0x4015bf
mov dword [ebp - 0x28], edi
sub ebx, ecx
lea edi, [esi + ecx*4]
xor eax, eax
xor edx, edx
jmp 0x401540
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
add edi, 4
dec ebx
je 0x4016ab
mov esi, dword [edi]
test edx, edx
je 0x401580
test eax, eax
jne 0x4015bf
mov dword [ebp - 0x10], edx
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
mov dword [ebp - 0x14], eax
push 0x409442
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
add esp, 8
test eax, eax
je 0x401530
push 0x409271
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
add esp, 8
jmp 0x401533
mov dword [ebp - 0x14], eax
push 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
mov dword [ebp - 0x10], eax
push 0x409442
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
add esp, 8
test eax, eax
je 0x401530
push 0x40926e
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
add esp, 8
mov edx, eax
mov eax, dword [ebp - 0x14]
jmp 0x401536
xor edx, edx
xor eax, eax
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], eax
push 2
call esi
add esp, 4
push str.Usage:_hprof_conf___z__infile_outfile_n
push eax
call fcn.00401990
add esp, 8
push 2
call esi
add esp, 4
push 0x40929b
push eax
call fcn.00401990
add esp, 8
push 2
call esi
add esp, 4
push str.___z:_exclude_non_app_heaps__such_as_Zygote_n
push eax
call fcn.00401990
add esp, 8
push 2
call esi
add esp, 4
push 0x40929b
push eax
call fcn.00401990
add esp, 8
push 2
call esi
add esp, 4
push str.Specify___for_either_or_both_files_to_use_stdin_stdout._n
push eax
call fcn.00401990
add esp, 8
push 2
call esi
add esp, 4
push 0x40929b
push eax
call fcn.00401990
add esp, 8
push 2
call esi
add esp, 4
push str.Copyright__C__2009_The_Android_Open_Source_Project_n_nThis_software_is_built_from_source_code_licensed_under_the_Apache_License__nVersion_2.0__the__License__._You_may_obtain_a_copy_of_the_License_at_n_n_____http:__www.apache.org_licenses_LICENSE_2.0_n_nSee_the_associated_NOTICE_file_for_this_software_for_further_details._n
push eax
call fcn.00401990
add esp, 8
mov ebx, 2
push 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x401682
cmp ecx, eax
je 0x401682
push ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x4016a1
cmp ecx, eax
je 0x4016a1
push ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
mov eax, ebx
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
test edx, edx
je 0x4015bf
test eax, eax
je 0x4015bf
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], eax
push 0xc
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
test eax, eax
je 0x401829
mov esi, eax
push 0x40
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
xor edi, edi
mov dword [esi], eax
mov dword [esi + 4], 0
mov dword [ebp - 0x18], esi
mov dword [esi + 8], 0x40
mov dword [ebp - 0x1c], 0x40
nop dword [eax + eax]
lea ecx, [edi + 1]
cmp ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x24], ecx
jbe 0x401730
lea esi, [edi + 0x81]
push esi
push eax
mov ebx, eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
test eax, eax
je 0x401735
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], esi
mov dword [ecx], eax
jmp 0x401760
mov dword [ebp - 0x20], eax
jmp 0x401760
mov dword [ebp - 0x20], ebx
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push esi
push str.ERROR:_realloc_failed_on_size_d_n
push eax
call fcn.00401990
add esp, 0xc
nop word cs:[eax + eax]
nop dword [eax]
mov esi, dword [ebp - 0x10]
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
mov ebx, eax
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_feof
add esp, 4
test eax, eax
jne 0x4017e5
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
add esp, 4
test eax, eax
jne 0x4017e5
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
test ebx, ebx
mov byte [eax + edi], bl
mov edi, ecx
jne 0x401700
mov edi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
mov dword [edi + 4], ecx
mov dword [edi + 8], edx
push str.JAVA_PROFILE_1.0.3
push eax
mov esi, eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
add esp, 8
test eax, eax
je 0x401833
push str.JAVA_PROFILE_1.0.2
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
add esp, 8
mov ebx, eax
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
test ebx, ebx
je 0x40189b
push str.ERROR:_expecting_HPROF_file_format_1.0.3_n
jmp 0x401803
mov eax, dword [ebp - 0x18]
mov dword [eax + 4], edi
mov edi, eax
mov eax, dword [ebp - 0x1c]
mov dword [edi + 8], eax
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push str.ERROR:_failed_reading_input_n
push eax
call fcn.00401990
add esp, 8
mov ebx, 0xffffffff
push dword [edi]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
jmp 0x401663
mov ebx, 0xffffffff
jmp 0x401663
mov byte [esi + 0x11], 0x32
mov esi, dword [edi + 4]
push dword [ebp - 0x14]
push esi
push 1
push dword [edi]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
cmp eax, esi
jne 0x4018a5
mov edx, dword [ebp - 0x10]
mov dword [edi + 4], 0
mov ecx, edi
push 0
push 0xc
call fcn.00401a00
add esp, 8
mov ebx, 0xffffffff
test eax, eax
jne 0x401811
mov edx, dword [ebp - 0x14]
mov ecx, edi
call fcn.004019b0
test eax, eax
jne 0x401811
mov edx, dword [ebp - 0x10]
mov ecx, edi
push 1
push 1
call fcn.00401a00
add esp, 8
test eax, eax
jne 0x401811
mov esi, dword [ebp - 0x10]
jmp 0x4018f7
push str.ERROR:_HPROF_file_already_in_1.0.2_format._n
jmp 0x401803
mov ebx, eax
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push esi
push ebx
push str.ERROR:_write__zu_of__zu_bytes_n
push eax
call fcn.00401990
add esp, 0x10
jmp 0x40180c
mov edi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov ecx, edi
call fcn.004019b0
mov esi, dword [ebp - 0x10]
test eax, eax
jne 0x401811
mov ecx, edi
mov edx, esi
push 1
push 1
call fcn.00401a00
add esp, 8
test eax, eax
jne 0x401984
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_feof
add esp, 4
test eax, eax
jne 0x401982
mov edi, dword [ebp - 0x18]
mov edx, esi
mov ecx, edi
push 0
push 8
call fcn.00401a00
add esp, 8
test eax, eax
jne 0x401811
mov eax, dword [edi]
movzx ecx, byte [eax]
mov eax, dword [eax + 5]
bswap eax
test eax, eax
je 0x40194c
mov edx, dword [ebp - 0x10]
mov byte [ebp - 0x24], cl
mov ecx, edi
push 0
push eax
call fcn.00401a00
movzx ecx, byte [ebp - 0x24]
add esp, 8
test eax, eax
jne 0x401811
or cl, 0x10
cmp cl, 0x1c
jne 0x4018c7
mov edi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov ecx, edi
push dword [ebp - 0x28]
call fcn.00401ab0
add esp, 4
test eax, eax
jne 0x401811
mov esi, dword [ebp - 0x10]
mov dword [edi + 4], 0
jmp 0x4018df
xor ebx, ebx
mov edi, dword [ebp - 0x18]
jmp 0x401811