Function at 0x40b0c0
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [0x8531c0]
mov esi, dword [esp + 0x50]
mov dword [esp + 0x2c], 0x102
and ebx, 0x1000
je 0x40b0f0
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], 0x835180
call fcn.0041eed0
mov dword [esp], esi
mov ecx, 0x8554b8
call fcn.0043fdb0
sub esp, 4
test eax, eax
je 0x40b310
mov dword [esp + 4], 0x71b336
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__wfopen]
test eax, eax
mov dword [esp + 0x14], eax
je 0x40b340
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.006eb360
mov esi, dword [esp + 0x14]
mov dword [esp + 8], 1
mov edi, eax
mov dword [esp + 4], 3
mov dword [esp], 0x71b367
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
add edi, 4
and edi, 0xfffffffc
mov ecx, eax
sub ecx, edi
sub esi, ecx
add ecx, 0x7f4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov dword [esp + 0x18], ecx
mov edx, dword [ebp + 0x7f4]
mov edi, dword [ebp + 0x7f8]
sub edi, edx
mov esi, edi
mov dword [eax + 0x7f4], edi
sar esi, 4
imul eax, esi, 0xcccccccd
lea esi, [ecx + 0x7fc]
mov dword [ecx + 0x7f8], 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 esi, dword [ebp + 0x804]
sub esi, ecx
mov dword [eax], esi
mov edi, esi
sar esi, 2
imul edx, esi, 0x286bca1b
lea esi, [eax + 8]
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.006eb360
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.004040c0
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.006eb310
mov dword [esp], ebp
call sub.msvcrt.dll_fclose
mov dword [esp + 4], 0x71b36b
mov dword [esp], 0x835180
call fcn.0041eed0
mov dword [esp], edi
call fcn.006eb310
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], 0x835180
call fcn.0041e920
add esp, 0x3c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 4
call fcn.0041f1c0
mov dword [esp + 4], str.ERROR_in_state_save__:_failed__wfopen__S__n
mov dword [esp + 8], eax
mov ebx, 1
mov dword [esp], 0x835180
call fcn.0041e920
jmp 0x40b0e3