Function at 0x51be510
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5235699
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x53f3c3c]
xor eax, esp
mov dword [esp + 0x24], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x53f3c3c]
xor eax, esp
push eax
lea eax, [esp + 0x3c]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x4c]
mov ebp, ecx
mov esi, dword [ebp + 4]
xor edi, edi
cmp esi, edi
jne 0x51be582
mov eax, dword [ebp]
cmp eax, edi
je 0x51be57b
mov eax, dword [eax + 0x130]
push str.DumpFileWriter::WriteFileName
push 0x71f
push str..MemoryDumpMemoryDumpMain.cpp
push str._MemoryDump__File___s__Line___d__Function___s:__Error__dump_file_handle__NULL_n
push eax
call fcn.051be010
add esp, 0x14
xor al, al
jmp 0x51be6d8
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x51be587
push esi
sub eax, edx
push 4
not eax
lea ecx, [esp + 0x1c]
add eax, 8
push 1
push ecx
mov dword [esp + 0x24], eax
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x51be5e2
mov eax, dword [ebp]
cmp eax, edi
je 0x51be57b
mov edx, dword [eax + 0x130]
push str.DumpFileWriter::WriteFileName
push 0x728
push str..MemoryDumpMemoryDumpMain.cpp
push str._MemoryDump__File___s__Line___d__Function___s:__Error__fwrite_fail_n
push edx
call fcn.051be010
add esp, 0x14
xor al, al
jmp 0x51be6d8
push ebx
lea ecx, [esp + 0x20]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov dword [esp + 0x44], edi
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x51be5f6
sub eax, edx
je 0x51be64d
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x51be606
sub eax, edx
mov esi, eax
cmp edi, dword [esp + 0x30]
jbe 0x51be61d
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
cmp dword [esp + 0x34], 0x10
mov eax, dword [esp + 0x20]
jae 0x51be62c
lea eax, [esp + 0x20]
sub esi, edi
mov cl, byte [esi + ebx - 1]
not cl
mov byte [eax + edi], cl
mov eax, ebx
inc edi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x51be640
sub eax, edx
cmp edi, eax
jb 0x51be601
cmp dword [esp + 0x34], 0x10
mov ecx, dword [esp + 0x20]
jae 0x51be65c
lea ecx, [esp + 0x20]
mov edx, dword [ebp + 4]
mov eax, dword [esp + 0x30]
push edx
push eax
push 1
push ecx
mov esi, eax
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
cmp eax, esi
je 0x51be6b7
mov eax, dword [ebp]
test eax, eax
je 0x51be6a1
mov eax, dword [eax + 0x130]
push str.DumpFileWriter::WriteFileName
push 0x734
push str..MemoryDumpMemoryDumpMain.cpp
push str._MemoryDump__File___s__Line___d__Function___s:__Error__fwrite_fail_n
push eax
call fcn.051be010
add esp, 0x14
mov dword [esp + 0x44], 0xffffffff
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
xor al, al
jmp 0x51be6d8
mov ecx, dword [ebp + 4]
push ecx
call dword [sym.imp.MSVCR90.dll_fflush]
add esp, 4
mov dword [esp + 0x44], 0xffffffff
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov al, 1
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.0520b902
add esp, 0x34
ret 4