Function at 0x502470
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
mov edi, dword [ebp + 8]
test edi, edi
jne 0x502494
push str.FDBWriteBinaryField:_Null_FDB_file_object
push edi
push edi
call sym.FLAMESLauncher.exe_FMHAnnounceError
add esp, 0xc
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [edi + 8]
test ebx, ebx
jne 0x5024b3
push str.FDBWriteBinaryField:_File_not_open
push ebx
push ebx
call sym.FLAMESLauncher.exe_FMHAnnounceError
add esp, 0xc
xor eax, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi + 0x60]
test cl, 2
jne 0x5024d4
push str.FDBWriteBinaryField:_File_not_open_for_writing
push 0
push 0
call sym.FLAMESLauncher.exe_FMHAnnounceError
add esp, 0xc
xor eax, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0xc], 0
jne 0x5024f3
push str.FDBWriteBinaryField:_Bad_data_address
push 0
push 0
call sym.FLAMESLauncher.exe_FMHAnnounceError
add esp, 0xc
xor eax, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x10]
test eax, eax
jne 0x502511
push str.FDBWriteBinaryField:_Prior_call_to_FDBWriteProem_unsuccessful
push eax
push eax
call sym.FLAMESLauncher.exe_FMHAnnounceError
add esp, 0xc
xor eax, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
mov edx, dword [eax + 0x94]
mov dword [ebp - 4], edx
test edx, edx
jne 0x502535
push str.FDBWriteBinaryField:_Invalid_internal_record_object
push edx
push edx
call sym.FLAMESLauncher.exe_FMHAnnounceError
add esp, 0xc
xor eax, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
mov cl, byte [edx + 0x40]
mov byte [ebp + 0xb], cl
cmp cl, 0x52
mov ecx, dword [edi + 0x60]
je 0x502562
cmp byte [ebp + 0xb], 0x50
je 0x502562
push str.FDBWriteBinaryField:_Function_called_for_writing_data_other_than_a_binary_field
push 0
push 0
call sym.FLAMESLauncher.exe_FMHAnnounceError
add esp, 0xc
xor eax, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
test cl, 0x40
je 0x502580
push str.FDBWriteBinaryField:_Writing_binary_data_is_not_supported_in_XML
push 0
push 0
call sym.FLAMESLauncher.exe_FMHAnnounceError
add esp, 0xc
xor eax, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [edi + 0x5c]
cmp dword [edi + 0x58], esi
jne 0x5025a3
push str.FDBWrite:_Called_too_many_times.
push 0
push 0
call sym.FLAMESLauncher.exe_FMHAnnounceError
add esp, 0xc
xor eax, eax
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
cmp dword [eax + 0x88], 1
je 0x5025c6
push str.FDBWriteBinaryField:_Should_not_be_called_for_writing_a_record_that_contains_more_than_one_field
push 0
push 0
call sym.FLAMESLauncher.exe_FMHAnnounceError
add esp, 0xc
xor eax, eax
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
lea eax, [esi + 1]
mov dword [edi + 0x5c], eax
test byte [edx + 0x70], 2
jne 0x5026a7
test cl, 0x10
je 0x502625
mov eax, dword [ebp + 0x10]
lea edx, [ebp + 8]
mov dword [ebp + 8], eax
lea esi, [ebp + 0xb]
mov al, byte [esi]
mov cl, byte [edx]
mov byte [edx], al
inc edx
mov byte [esi], cl
dec esi
cmp edx, esi
jb 0x5025e7
push ebx
push 1
lea eax, [ebp + 8]
push 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
test eax, eax
jne 0x50263d
push str.FDBWriteBinaryField:_Error_writing_file
push 0
push 0
call sym.FLAMESLauncher.exe_FMHAnnounceError
add esp, 0xc
xor eax, eax
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0x10]
push esi
push 0x5a12cc
push ebx
call fcn.0049cc60
add esp, 0xc
test eax, eax
js 0x50260b
jmp 0x502640
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp - 4]
cmp byte [eax + 0x40], 0x52
jne 0x50265f
push ebx
push 1
push esi
push dword [ebp + 0xc]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
test eax, eax
jne 0x502693
jmp 0x50260b
test esi, esi
jle 0x502693
movups xmm0, xmmword [0x5a1074]
mov eax, dword [ebp + 0xc]
movups xmmword [ebp - 0x1c], xmm0
mov dword [ebp - 0x1c], ebx
movq xmm0, qword [0x5a1084]
movq qword [ebp - 0xc], xmm0
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 8], esi
call fcn.0051a520
add esp, 4
test byte [edi + 0x60], 0x10
jne 0x5026a7
push 0x5b9a9c
push ebx
call fcn.0049cc60
add esp, 8
pop esi
pop ebx
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret