Function at 0x40b6e0
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [0x8671a0]
mov esi, dword [esp + 0x50]
mov dword [esp + 0x2c], 0x102
and ebx, 0x1000
je 0x40b710
xor ebx, ebx
add esp, 0x3c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov dword [esp + 8], esi
mov dword [esp + 4], str.Saving_state_in__S...
mov ebp, ecx
mov dword [esp], 0x849160
call fcn.0041f5d0
mov dword [esp + 4], 0x72f32c
mov dword [esp], esi
mov ecx, 0x869458
call fcn.00441fa0
sub esp, 8
test eax, eax
je 0x40b930
mov dword [esp + 4], 0x72f32c
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__wfopen]
test eax, eax
mov dword [esp + 0x14], eax
je 0x40b960
mov edx, dword [ebp + 0x804]
mov eax, dword [ebp + 0x7f8]
sub edx, dword [ebp + 0x800]
sub eax, dword [ebp + 0x7f4]
lea edx, [edx + eax + 0x80c]
mov eax, dword [ebp + 0x82c]
sub eax, dword [ebp + 0x828]
add eax, edx
mov dword [esp], eax
mov dword [esp + 0x1c], eax
call fcn.006fec20
mov esi, dword [esp + 0x14]
mov dword [esp + 8], 1
mov edi, eax
mov dword [esp + 4], 3
mov dword [esp], 0x72f38f
mov dword [esp + 0x18], eax
mov dword [esp + 0xc], esi
call sub.msvcrt.dll_fwrite
lea eax, [esp + 0x2c]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], 4
mov dword [esp + 0x14], esi
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [ebp]
mov esi, ebp
mov dword [edi], eax
mov eax, dword [ebp + 0x7f0]
mov dword [edi + 0x7f0], eax
mov eax, edi
lea edi, [edi + 4]
mov ecx, eax
and edi, 0xfffffffc
sub ecx, edi
sub esi, ecx
add ecx, 0x7f4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov esi, eax
mov dword [esp + 0x18], esi
add esi, 0x7fc
mov edx, dword [ebp + 0x7f4]
mov edi, dword [ebp + 0x7f8]
sub edi, edx
mov ecx, edi
mov dword [eax + 0x7f4], edi
sar ecx, 4
imul eax, ecx, 0xcccccccd
mov dword [esi - 4], eax
mov dword [esp + 8], edi
mov dword [esp + 4], edx
mov dword [esp], esi
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebp + 0x800]
lea eax, [esi + edi]
mov edi, dword [ebp + 0x804]
lea esi, [eax + 8]
sub edi, ecx
mov edx, edi
mov dword [eax], edi
sar edx, 2
imul edx, edx, 0x286bca1b
mov dword [eax + 4], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], edi
mov dword [esp], esi
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebp + 0x828]
mov edx, dword [ebp + 0x82c]
lea eax, [esi + edi]
add eax, 8
sub edx, ecx
mov dword [eax - 8], edx
mov dword [eax - 4], edx
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov ebp, dword [esp + 0x1c]
mov dword [esp], ebp
call fcn.006fec20
mov edi, dword [esp + 0x18]
mov esi, eax
mov dword [esp + 0xc], ebp
mov dword [esp + 4], ebp
mov dword [esp], esi
mov dword [esp + 8], edi
call fcn.00404200
mov ebp, dword [esp + 0x14]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], esi
mov dword [esp + 0xc], ebp
call sub.msvcrt.dll_fwrite
mov dword [esp], esi
call fcn.006febd0
mov dword [esp], ebp
call sub.msvcrt.dll_fclose
mov dword [esp + 4], 0x72f393
mov dword [esp], 0x849160
call fcn.0041f5d0
mov dword [esp], edi
call fcn.006febd0
add esp, 0x3c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov dword [esp + 8], esi
mov dword [esp + 4], str.ERROR_in_state_save__:_Write_protected__S_n
mov ebx, 1
mov dword [esp], 0x849160
invalid