Function at 0x523940
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov edx, dword [ebp + 8]
mov dword [ebp - 0x20], 1
push ebx
push esi
push edi
test edx, edx
jne 0x523982
mov eax, dword [0x801448]
test eax, eax
je 0x52426e
mov eax, dword [eax + 0x14]
test eax, eax
je 0x52426e
push str.FDLWrite:_Null_FDL_file_object
call eax
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [edx + 0x100]
mov dword [ebp - 0x10], ecx
test ecx, ecx
jne 0x5239ba
mov eax, dword [0x801448]
test eax, eax
je 0x52426e
mov eax, dword [eax + 0x14]
test eax, eax
je 0x52426e
push str.FDLWrite:_Given_file_not_open
call eax
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edx + 0x110]
test al, 1
je 0x5239ef
mov eax, dword [0x801448]
test eax, eax
je 0x52426e
mov eax, dword [eax + 0x14]
test eax, eax
je 0x52426e
push str.FDLWrite:_Given_file_not_open_for_writing
call eax
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0xc], 0
jne 0x523a20
mov eax, dword [0x801448]
test eax, eax
je 0x52426e
mov eax, dword [eax + 0x14]
test eax, eax
je 0x52426e
push str.FDLWrite:_Bad_structure_address
call eax
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edx + 0x108]
mov dword [ebp - 0x14], edx
test edx, edx
jne 0x523a58
mov eax, dword [0x801448]
test eax, eax
je 0x52426e
mov eax, dword [eax + 0x14]
test eax, eax
je 0x52426e
push str.FDLWrite:_Prior_call_to_FDLWriteProem_unsuccessful
call eax
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [edx + 0x94]
mov dword [ebp - 0x24], edi
test edi, edi
jne 0x523a90
mov eax, dword [0x801448]
test eax, eax
je 0x52426e
mov eax, dword [eax + 0x14]
test eax, eax
je 0x52426e
push str.FDLWrite:_Invalid_interal_record_object
call eax
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test al, 0x10
je 0x523c7b
mov esi, dword [0x801448]
mov ecx, edx
mov eax, dword [edx + 0x84]
mov ebx, dword [edx + 0x90]
mov dword [ebp - 8], eax
mov eax, dword [edx + 0x8c]
cmp dword [esi + 0x10], eax
jge 0x523af5
push 0xa83
push str.C:Development_flameskernelutil_fdb_fdl.c
push eax
push 1
push dword [esi + 0xc]
push dword [esi]
call sym.FLAMESLauncher.exe_MXV01Resize
mov esi, dword [0x801448]
add esp, 0x18
mov ecx, dword [ebp + 8]
mov dword [esi + 0xc], eax
mov eax, dword [ecx + 0x108]
mov eax, dword [eax + 0x8c]
mov dword [esi + 0x10], eax
mov ecx, dword [ecx + 0x108]
push dword [ecx + 0x8c]
push dword [ebp + 0xc]
push dword [esi + 0xc]
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
test ebx, ebx
jne 0x523b27
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x108]
mov ecx, dword [eax + 0x88]
mov ebx, dword [eax + 0x94]
mov dword [ebp - 8], ecx
jmp 0x523b2a
mov ecx, dword [ebp - 8]
test ecx, ecx
jle 0x523b82
add ebx, 0x44
mov al, byte [ebx - 4]
cmp al, 0x42
je 0x523b74
cmp al, 0x43
je 0x523b74
xor edi, edi
cmp dword [ebx + 4], edi
jbe 0x523b74
mov edx, dword [ebx]
imul edx, edi
add edx, dword [ebx + 8]
add edx, dword [esi + 0xc]
lea esi, [edx - 1]
add esi, dword [ebx]
cmp edx, esi
jae 0x523b65
mov al, byte [esi]
mov cl, byte [edx]
mov byte [edx], al
inc edx
mov byte [esi], cl
dec esi
cmp edx, esi
jb 0x523b57
mov esi, dword [0x801448]
inc edi
cmp edi, dword [ebx + 4]
jb 0x523b43
mov ecx, dword [ebp - 8]
add ebx, 0x70
sub ecx, 1
mov dword [ebp - 8], ecx
jne 0x523b31
mov edi, dword [ebp - 0x24]
mov edx, dword [esi + 0xc]
xor ebx, ebx
mov esi, dword [ebp - 0x14]
mov dword [ebp + 0xc], edx
cmp dword [esi + 0x88], ebx
jle 0x52421c
add edi, 0x4c
nop dword [eax]
test byte [edi + 0x20], 2
jne 0x523c52
cmp byte [edi - 0xc], 0x43
jne 0x523c34
mov ecx, dword [edi]
add ecx, edx
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x523bc0
sub ecx, edx
lea esi, [ebp - 0xb]
lea edx, [ebp - 0xc]
lea eax, [ecx + 1]
movzx eax, ax
mov dword [ebp - 0xc], eax
mov al, byte [esi]
mov cl, byte [edx]
mov byte [edx], al
inc edx
mov byte [esi], cl
dec esi
cmp edx, esi
jb 0x523bd8
push dword [ebp - 0x10]
lea eax, [ebp - 0xc]
push 1
push 2
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
test eax, eax
je 0x523c6e
lea edx, [ebp - 0xc]
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 0x523c04
push dword [ebp - 0x10]
movsx eax, word [ebp - 0xc]
push 1
push eax
mov eax, dword [edi]
add eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
test eax, eax
je 0x523c6e
mov esi, dword [ebp - 0x14]
jmp 0x523c4f
push dword [ebp - 0x10]
mov eax, dword [edi]
push dword [edi - 4]
add eax, edx
push dword [edi - 8]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
test eax, eax
je 0x523c6e
mov edx, dword [ebp + 0xc]
inc ebx
add edi, 0x70
cmp ebx, dword [esi + 0x88]
jl 0x523ba0
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp + 8]
push str.FDLWrite:_Error_writing_file__s
jmp 0x524247
xor eax, eax
mov dword [ebp - 0x24], eax
cmp dword [edx + 0x88], eax
jle 0x52420e
mov ecx, dword [ebp - 0x14]
lea edx, [edi + 0x4c]
mov dword [ebp - 4], edx
test byte [edx + 0x20], 2
jne 0x5241f5
movsx eax, byte [edx - 0xc]
xor esi, esi
mov ecx, dword [edx - 4]
add eax, 0xffffffbe
mov dword [ebp - 8], ecx
cmp eax, 0x16
ja case.0x523cbe.69
movzx eax, byte [eax + 0x52429c]
jmp dword [eax*4 + 0x524278]
xor eax, eax
mov dword [ebp - 0x18], eax
test ecx, ecx
jle case.0x523cbe.69
mov edi, dword [0x801448]
cmp eax, 1
jne 0x523d10
mov ebx, esi
imul ebx, ecx
add ebx, ebx
cmp dword [edi + 8], ebx
jge 0x523d10
push 0x7dd
push str.C:Development_flameskernelutil_fdb_fdl.c
push ebx
push eax
push dword [edi + 4]
push dword [edi]
call sym.FLAMESLauncher.exe_MXV01Resize
mov edx, dword [ebp - 4]
add esp, 0x18
mov dword [edi + 4], eax
mov eax, dword [0x801448]
mov dword [eax + 8], ebx
mov eax, dword [edx]
sub esp, 8
mov ecx, dword [ebp - 0x18]
lea eax, [eax + ecx*8]
mov ecx, dword [ebp + 0xc]
movsd xmm0, qword [eax + ecx]
lea eax, [edx + 0xc]
movsd qword [esp], xmm0
push eax
mov eax, dword [edi + 4]
add eax, esi
push eax
call fcn.004f9620
mov edi, dword [0x801448]
add esp, 0x10
mov esi, dword [edi + 4]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x523d46
mov eax, dword [ebp - 0x18]
sub esi, ecx
mov ecx, dword [ebp - 8]
inc eax
mov edx, dword [ebp - 4]
mov dword [ebp - 0x18], eax
cmp eax, ecx
jl 0x523cd8
jmp 0x5241c1
xor eax, eax
mov dword [ebp - 0x18], eax
test ecx, ecx
jle case.0x523cbe.69
mov edi, dword [0x801448]
nop dword [eax]
cmp eax, 1
jne 0x523db8
mov ebx, esi
imul ebx, ecx
add ebx, ebx
cmp dword [edi + 8], ebx
jge 0x523db8
push 0x7dd
push str.C:Development_flameskernelutil_fdb_fdl.c
push ebx
push eax
push dword [edi + 4]
push dword [edi]
call sym.FLAMESLauncher.exe_MXV01Resize
mov edx, dword [ebp - 4]
add esp, 0x18
mov dword [edi + 4], eax
mov eax, dword [0x801448]
mov dword [eax + 8], ebx
mov eax, dword [edx]
sub esp, 8
mov ecx, dword [ebp - 0x18]
lea eax, [eax + ecx*4]
mov ecx, dword [ebp + 0xc]
movss xmm0, dword [eax + ecx]
lea eax, [edx + 0xc]
cvtps2pd xmm0, xmm0
movsd qword [esp], xmm0
push eax
mov eax, dword [edi + 4]
add eax, esi
push eax
call fcn.004f9620
mov edi, dword [0x801448]
add esp, 0x10
mov esi, dword [edi + 4]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x523df1
mov eax, dword [ebp - 0x18]
sub esi, ecx
mov ecx, dword [ebp - 8]
inc eax
mov edx, dword [ebp - 4]
mov dword [ebp - 0x18], eax
cmp eax, ecx
jl 0x523d80
jmp 0x5241c1
xor eax, eax
mov dword [ebp - 0x18], eax
test ecx, ecx
jle case.0x523cbe.69
mov edi, dword [0x801448]
cmp eax, 1
jne 0x523e5f
mov ebx, esi
imul ebx, ecx
add ebx, ebx
cmp dword [edi + 8], ebx
jge 0x523e5f
push 0x7dd
push str.C:Development_flameskernelutil_fdb_fdl.c
push ebx
push eax
push dword [edi + 4]
push dword [edi]
call sym.FLAMESLauncher.exe_MXV01Resize
mov edx, dword [ebp - 4]
add esp, 0x18
mov dword [edi + 4], eax
mov eax, dword [0x801448]
mov dword [eax + 8], ebx
mov eax, dword [edx]
sub esp, 8
mov ecx, dword [ebp - 0x18]
lea eax, [eax + ecx*8]
mov ecx, dword [ebp + 0xc]
movsd xmm0, qword [eax + ecx]
lea eax, [edx + 0xc]
movsd qword [esp], xmm0
push eax
mov eax, dword [edi + 4]
add eax, esi
push eax
call fcn.004f9620
mov edi, dword [0x801448]
add esp, 0x10
mov esi, dword [edi + 4]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x523e95
mov eax, dword [ebp - 0x18]
sub esi, ecx
mov ecx, dword [ebp - 8]
inc eax
mov edx, dword [ebp - 4]
mov dword [ebp - 0x18], eax
cmp eax, ecx
jl 0x523e27
jmp 0x5241c1
xor eax, eax
mov dword [ebp - 0x18], eax
test ecx, ecx
jle case.0x523cbe.69
mov edi, dword [0x801448]
nop dword [eax + eax]
cmp eax, 1
jne 0x523f08
mov ebx, esi
imul ebx, ecx
add ebx, ebx
cmp dword [edi + 8], ebx
jge 0x523f08
push 0x7dd
push str.C:Development_flameskernelutil_fdb_fdl.c
push ebx
push eax
push dword [edi + 4]
push dword [edi]
call sym.FLAMESLauncher.exe_MXV01Resize
mov edx, dword [ebp - 4]
add esp, 0x18
mov dword [edi + 4], eax
mov eax, dword [0x801448]
mov dword [eax + 8], ebx
mov eax, dword [edx]
mov ecx, dword [ebp - 0x18]
lea eax, [eax + ecx*4]
mov ecx, dword [ebp + 0xc]
push dword [eax + ecx]
lea eax, [edx + 0xc]
push eax
mov eax, dword [edi + 4]
add eax, esi
push eax
call fcn.004f9620
mov edi, dword [0x801448]
add esp, 0xc
mov esi, dword [edi + 4]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x523f34
mov eax, dword [ebp - 0x18]
sub esi, ecx
mov ecx, dword [ebp - 8]
inc eax
mov edx, dword [ebp - 4]
mov dword [ebp - 0x18], eax
cmp eax, ecx
jl 0x523ed0
jmp 0x5241c1
xor eax, eax
mov dword [ebp - 0x18], eax
test ecx, ecx
jle case.0x523cbe.69
mov edi, dword [0x801448]
cmp eax, 1
jne 0x523f9e
mov ebx, esi
imul ebx, ecx
add ebx, ebx
cmp dword [edi + 8], ebx
jge 0x523f9e
push 0x7dd
push str.C:Development_flameskernelutil_fdb_fdl.c
push ebx
push eax
push dword [edi + 4]
push dword [edi]
call sym.FLAMESLauncher.exe_MXV01Resize
mov edx, dword [ebp - 4]
add esp, 0x18
mov dword [edi + 4], eax
mov eax, dword [0x801448]
mov dword [eax + 8], ebx
mov eax, dword [edx]
mov ecx, dword [ebp - 0x18]
lea eax, [eax + ecx*2]
mov ecx, dword [ebp + 0xc]
movsx eax, word [eax + ecx]
push eax
lea eax, [edx + 0xc]
push eax
mov eax, dword [edi + 4]
add eax, esi
push eax
call fcn.004f9620
mov edi, dword [0x801448]
add esp, 0xc
mov esi, dword [edi + 4]
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x523fd0
mov eax, dword [ebp - 0x18]
sub esi, ecx
mov ecx, dword [ebp - 8]
inc eax
mov edx, dword [ebp - 4]
mov dword [ebp - 0x18], eax
cmp eax, ecx
jl 0x523f66
jmp 0x5241c1
xor eax, eax
mov dword [ebp - 0x18], eax
test ecx, ecx
jle case.0x523cbe.69
mov edi, dword [0x801448]
cmp eax, 1
jne 0x52403e
mov ebx, esi
imul ebx, ecx
add ebx, ebx
cmp dword [edi + 8], ebx
jge 0x52403e
push 0x7dd
push str.C:Development_flameskernelutil_fdb_fdl.c
push ebx
push eax
push dword [edi + 4]
push dword [edi]
call sym.FLAMESLauncher.exe_MXV01Resize
mov edx, dword [ebp - 4]
add esp, 0x18
mov dword [edi + 4], eax
mov eax, dword [0x801448]
mov dword [eax + 8], ebx
mov eax, dword [edx]
mov ecx, dword [ebp - 0x18]
lea eax, [eax + ecx*4]
mov ecx, dword [ebp + 0xc]
push dword [eax + ecx]
lea eax, [edx + 0xc]
push eax
mov eax, dword [edi + 4]
add eax, esi
push eax
call fcn.004f9620
mov edi, dword [0x801448]
add esp, 0xc
mov esi, dword [edi + 4]
lea ecx, [esi + 1]
nop word [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x524070
mov eax, dword [ebp - 0x18]
sub esi, ecx
mov ecx, dword [ebp - 8]
inc eax
mov edx, dword [ebp - 4]
mov dword [ebp - 0x18], eax
cmp eax, ecx
jl 0x524006
jmp 0x5241c1
xor eax, eax
mov dword [ebp - 0x18], eax
test ecx, ecx
jle case.0x523cbe.69
mov edi, dword [0x801448]
cmp eax, 1
jne 0x5240de
mov ebx, esi
imul ebx, ecx
add ebx, ebx
cmp dword [edi + 8], ebx
jge 0x5240de
push 0x7dd
push str.C:Development_flameskernelutil_fdb_fdl.c
push ebx
push eax
push dword [edi + 4]
push dword [edi]
call sym.FLAMESLauncher.exe_MXV01Resize
mov edx, dword [ebp - 4]
add esp, 0x18
mov dword [edi + 4], eax
mov eax, dword [0x801448]
mov dword [eax + 8], ebx
mov eax, dword [edx]
add eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0xc]
movsx eax, byte [eax + ecx]
push eax
lea eax, [edx + 0xc]
push eax
mov eax, dword [edi + 4]
add eax, esi
push eax
call fcn.004f9620
mov edi, dword [0x801448]
add esp, 0xc
mov esi, dword [edi + 4]
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x524110
mov eax, dword [ebp - 0x18]
sub esi, ecx
mov ecx, dword [ebp - 8]
inc eax
mov edx, dword [ebp - 4]
mov dword [ebp - 0x18], eax
cmp eax, ecx
jl 0x5240a6
jmp 0x5241c1
mov esi, dword [ebp + 0xc]
mov edx, dword [edx]
add esi, edx
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x524140
sub esi, ecx
mov ecx, dword [0x801448]
lea edi, [esi + 1]
cmp dword [ecx + 8], edi
jge 0x524184
push 0x7dd
push str.C:Development_flameskernelutil_fdb_fdl.c
push edi
push 1
push dword [ecx + 4]
push dword [ecx]
call sym.FLAMESLauncher.exe_MXV01Resize
mov ecx, dword [0x801448]
add esp, 0x18
mov dword [ecx + 8], edi
mov edi, dword [ebp - 4]
mov dword [ecx + 4], eax
mov edx, dword [edi]
jmp 0x524187
mov edi, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
add eax, edx
push eax
push esi
lea eax, [edi + 0xc]
push eax
push dword [ecx + 4]
call fcn.004f9620
mov edi, dword [0x801448]
add esp, 0x10
mov esi, dword [edi + 4]
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x5241b0
sub esi, ecx
jmp 0x5241c1
mov edi, dword [0x801448]
cmp dword [ebp - 0x20], 0
mov eax, dword [edi + 4]
je 0x524228
dec esi
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], esi
inc eax
mov ecx, 0x59ef2c
push eax
push ecx
push dword [ebp - 0x10]
call fcn.0049cc60
add esp, 0xc
test eax, eax
js 0x52423f
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x14]
inc eax
add edx, 0x70
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], edx
cmp eax, dword [ecx + 0x88]
jl 0x523c95
mov ecx, dword [ebp - 0x10]
push 0x5b9a9c
push ecx
call fcn.0049cc60
add esp, 8
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x1c]
add ebx, esi
mov dword [ebp - 0x1c], ebx
cmp ebx, 0x50
jl 0x5241d6
mov dword [ebp - 0x1c], esi
mov ecx, 0x5a1340
jmp 0x5241db
push dword [ebp + 8]
push str.FDLWrite:_Error_writing_to_file__s
push 0x801450
call fcn.004f9620
mov eax, dword [0x801448]
add esp, 0xc
test eax, eax
je 0x52426e
mov eax, dword [eax + 0x14]
test eax, eax
je 0x52426e
push 0x801450
call eax
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret