Function at 0x54a730
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x9c
push ebx
push ebp
push esi
mov esi, dword [esp + 0xac]
xor ebx, ebx
mov dword [esp + 0x10], ebx
cmp dword [esi + 0x18], 8
push edi
lea ebp, [esi + 4]
jb 0x54a755
mov eax, dword [ebp]
jmp 0x54a757
mov eax, ebp
push ebx
push ebx
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
lea ecx, [esp + 0x10]
mov edi, eax
mov dword [esp + 0x10], ebx
call fcn.00548b20
cmp edi, 0xffffffff
je 0x54a783
mov dword [esp + 0x10], edi
jmp 0x54a787
mov edi, dword [esp + 0x10]
test edi, edi
jne 0x54a7fb
call fcn.005416d0
cmp eax, 1
jg 0x54a7f3
lea ebx, [edi + 1]
push ebx
push 0x308
push str.._file_util_win.cc
lea ecx, [esp + 0x24]
call fcn.005420d0
add eax, 4
push str.CreateFile_failed_for_path
push eax
call fcn.004701f0
add esp, 8
cmp dword [esi + 0x18], 8
jb 0x54a7c8
mov ecx, dword [ebp]
jmp 0x54a7ca
mov ecx, ebp
push ecx
push eax
call fcn.00541990
add esp, 8
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._error_code
push esi
call fcn.004701f0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
test bl, 1
jmp 0x54a93b
mov ecx, dword [esp + 0xb8]
mov edx, dword [esp + 0xb4]
push 0
lea eax, [esp + 0x18]
push eax
push ecx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x54a848
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0xb8]
cmp eax, edi
jne 0x54a8bb
lea ecx, [esp + 0x10]
mov esi, eax
call fcn.00548b20
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x9c
ret
call fcn.005416d0
cmp eax, 1
jg 0x54a8b3
push 1
push 0x314
push str.._file_util_win.cc
lea ecx, [esp + 0x24]
mov ebx, 2
call fcn.005420d0
add eax, 4
push str.writing_file
push eax
call fcn.004701f0
add esp, 8
cmp dword [esi + 0x18], 8
jb 0x54a888
mov ecx, dword [ebp]
jmp 0x54a88a
mov ecx, ebp
push ecx
push eax
call fcn.00541990
add esp, 8
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._failed__error_code
push esi
call fcn.004701f0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
test bl, 2
jmp 0x54a93b
call fcn.005416d0
cmp eax, 1
jg 0x54a938
push 1
push 0x318
push str.._file_util_win.cc
lea ecx, [esp + 0x24]
mov ebx, 4
call fcn.005420d0
mov ecx, dword [esp + 0x14]
push str._bytes_to
push ecx
add eax, ebx
push str.wrote
push eax
call fcn.004701f0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
push eax
call fcn.004701f0
add esp, 8
cmp dword [esi + 0x18], 8
jb 0x54a915
mov ecx, dword [ebp]
jmp 0x54a917
mov ecx, ebp
push ecx
push eax
call fcn.00541990
add esp, 8
push edi
push str._expected
push eax
call fcn.004701f0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
test bl, 4
je 0x54a946
lea ecx, [esp + 0x18]
call fcn.00542670
lea ecx, [esp + 0x10]
call fcn.00548b20
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x9c
ret