Function at 0x401510
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x402ffc
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
push esi
push edi
mov eax, dword [0x409004]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 4
call fcn.004022a9
mov dword [ebp - 0x1c], eax
push 0x10
mov dword [0x40a320], eax
mov dword [eax], 0
call fcn.004022a9
mov esi, eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 4], 0
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [0x40a324], esi
mov byte [ebp - 4], 1
push 0x24
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.004022a9
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [esi], eax
mov byte [ebp - 4], 2
push 0x18
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
call fcn.004022a9
mov dword [ebp - 4], 0xffffffff
push 0x18
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [esi + 8], eax
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
call fcn.004022a9
add esp, 0x14
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], 3
xor edi, edi
nop dword [eax]
nop dword [eax + eax]
mov eax, dword [edi + 0x40901c]
mov dword [ebp - 0x54], eax
mov al, byte [edi + 0x409020]
mov dword [ebp - 0x48], 0xffffffff
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov byte [ebp - 0x50], al
cmp al, 2
je 0x40175c
cmp al, 3
je 0x40175c
mov eax, dword [edi + 0x409024]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x4016bc
mov ecx, eax
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401640
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x4016bc
mov ecx, dword [0x40a320]
push 0xc
mov esi, dword [ecx]
lea eax, [esi + 1]
mov dword [ecx], eax
call fcn.004022a9
mov ecx, eax
xor edx, edx
xor eax, eax
mov dword [ebp - 0x14], ecx
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0x10]
add eax, 2
mov dword [ecx], esi
movzx eax, ax
push eax
mov word [ecx + 6], ax
mov word [ecx + 4], dx
call fcn.004022e7
mov esi, dword [ebp - 0x14]
add esp, 8
mov ecx, esi
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x10]
shr eax, 1
push eax
push dword [ebp - 0x18]
call fcn.00401010
mov dword [ebp - 0x44], esi
test esi, esi
je 0x4016bc
mov eax, dword [esi]
mov dword [ebp - 0x4c], eax
jmp 0x4016c3
mov dword [ebp - 0x4c], 0xffffffff
mov eax, dword [edi + 0x409028]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x401765
mov ecx, eax
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4016e0
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x401765
mov ecx, dword [0x40a320]
push 0xc
mov esi, dword [ecx]
lea eax, [esi + 1]
mov dword [ecx], eax
call fcn.004022a9
mov ecx, eax
xor edx, edx
xor eax, eax
mov dword [ebp - 0x1c], ecx
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0x10]
add eax, 2
mov dword [ecx], esi
movzx eax, ax
push eax
mov word [ecx + 6], ax
mov word [ecx + 4], dx
call fcn.004022e7
mov esi, dword [ebp - 0x1c]
add esp, 8
mov ecx, esi
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x10]
shr eax, 1
push eax
push dword [ebp - 0x18]
call fcn.00401010
mov dword [ebp - 0x40], esi
test esi, esi
je 0x401765
mov eax, dword [esi]
mov dword [ebp - 0x48], eax
jmp 0x401765
mov eax, dword [edi + 0x409024]
mov dword [ebp - 0x4c], eax
mov eax, dword [0x40a324]
or edx, 0xffffffff
mov dword [ebp - 0x10], eax
mov esi, dword [eax]
mov eax, dword [esi]
cmp eax, esi
je 0x40178d
cmp edx, 0xffffffff
je 0x401782
cmp dword [eax + 8], edx
jbe 0x401785
mov edx, dword [eax + 8]
mov ecx, dword [eax]
mov eax, ecx
cmp ecx, esi
jne 0x401778
mov ecx, dword [ebp - 0x10]
lea eax, [edx + 1]
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x58]
push eax
push esi
call fcn.00401d50
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x24]
mov esi, dword [ebp - 0x58]
cmp dword [eax + 4], 0
mov eax, 0xffffffff
cmove esi, eax
mov eax, dword [edi + 0x409018]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0x28], esi
push eax
call fcn.00402020
mov dword [edi + 0x409018], esi
add edi, 0x14
cmp edi, 0xe24
jb 0x4015f0
mov edi, 0x409e44
mov dword [ebp - 0x10], 0
nop
cmp dword [edi - 4], 0xffffffff
lea eax, [edi - 4]
xorps xmm0, xmm0
movlpd qword [ebp - 0x34], xmm0
jne 0x40180a
mov dword [ebp - 0x3c], 0xffffffff
jmp 0x401818
push eax
lea ecx, [ebp - 0x24]
call fcn.00401bd0
mov eax, dword [eax]
mov dword [ebp - 0x3c], eax
cmp dword [edi], 0xffffffff
jne 0x401826
mov dword [ebp - 0x38], 0xffffffff
jmp 0x401834
push edi
lea ecx, [ebp - 0x24]
call fcn.00401bd0
mov eax, dword [eax]
mov dword [ebp - 0x38], eax
mov cl, byte [edi + 4]
xor eax, eax
nop dword [eax]
test cl, 1
je 0x40184a
mov dl, byte [edi + 6]
jmp 0x40184c
xor dl, dl
mov byte [ebp + eax - 0x34], dl
inc eax
shr cl, 1
cmp eax, 8
jl 0x401840
mov eax, dword [0x40a324]
mov ecx, dword [eax + 8]
mov dword [ebp - 0x1c], ecx
mov eax, dword [ecx]
cmp eax, ecx
je 0x4018ac
nop dword [eax]
mov esi, dword [eax + 8]
lea ecx, [eax + 8]
mov edx, dword [ecx + 4]
cmp esi, dword [ebp - 0x3c]
jne 0x401887
cmp edx, dword [ebp - 0x38]
je 0x401ac3
cmp esi, 0xffffffff
jne 0x401895
cmp edx, dword [ebp - 0x38]
je 0x401ac3
cmp esi, dword [ebp - 0x3c]
jne 0x4018a3
cmp edx, 0xffffffff
je 0x401ac3
mov ecx, dword [eax]
mov eax, ecx
cmp ecx, dword [ebp - 0x1c]
jne 0x401870
mov esi, dword [0x40a324]
add esi, 8
cmp dword [esi + 4], 0xaaaaaaa
mov eax, dword [esi]
mov dword [ebp - 0x1c], eax
je 0x401b84
mov dword [ebp - 0x2c], esi
mov byte [ebp - 4], 4
push 0x18
mov dword [ebp - 0x28], 0
call fcn.004022a9
movups xmm0, xmmword [ebp - 0x3c]
mov byte [ebp - 4], 3
mov ecx, eax
mov edx, dword [ebp - 0x1c]
add esp, 4
mov dword [ebp - 0x28], 0
movups xmmword [ecx + 8], xmm0
inc dword [esi + 4]
mov eax, dword [edx + 4]
mov dword [ecx], edx
mov dword [ecx + 4], eax
mov dword [edx + 4], ecx
mov dword [eax], ecx
mov ecx, dword [ebp - 0x10]
add edi, 0xc
add ecx, 0xc
mov dword [ebp - 0x10], ecx
cmp ecx, 0xfc
jb 0x4017f0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 6
mov ecx, dword [0x40a324]
push eax
call fcn.00401240
push 0x407bb0
push str.SaturnRule.dat
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov ecx, dword [ebp - 0x34]
mov esi, eax
mov edi, dword [ebp - 0x38]
sub ecx, edi
push esi
push ecx
push 1
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov edx, dword [0x40a324]
add esp, 0x1c
mov dword [ebp - 0x10], edx
mov ecx, dword [edx]
mov eax, dword [ecx + 4]
mov dword [eax], 0
mov eax, dword [ecx]
test eax, eax
je 0x4019a6
mov esi, dword [eax]
push 0x24
push eax
call fcn.004022d9
add esp, 8
mov eax, esi
test esi, esi
jne 0x401990
mov edx, dword [ebp - 0x10]
mov eax, dword [edx]
mov dword [eax], eax
mov eax, dword [edx]
mov dword [eax + 4], eax
mov dword [edx + 4], 0
mov ecx, dword [edx + 8]
mov eax, dword [ecx + 4]
mov dword [eax], 0
mov eax, dword [ecx]
test eax, eax
je 0x4019de
mov esi, dword [eax]
push 0x18
push eax
call fcn.004022d9
add esp, 8
mov eax, esi
test esi, esi
jne 0x4019c8
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 8]
mov esi, dword [0x40a324]
mov dword [ebp - 0x10], esi
mov dword [eax], eax
mov eax, dword [edx + 8]
mov dword [eax + 4], eax
mov dword [edx + 0xc], 0
test esi, esi
je 0x401a78
mov ecx, dword [esi + 8]
mov eax, dword [ecx + 4]
mov dword [eax], 0
mov eax, dword [ecx]
test eax, eax
je 0x401a26
nop
mov esi, dword [eax]
push 0x18
push eax
call fcn.004022d9
add esp, 8
mov eax, esi
test esi, esi
jne 0x401a10
mov esi, dword [ebp - 0x10]
push 0x18
push dword [esi + 8]
call fcn.004022d9
mov ecx, dword [esi]
add esp, 8
mov eax, dword [ecx + 4]
mov dword [eax], 0
mov eax, dword [ecx]
test eax, eax
je 0x401a5a
mov esi, dword [eax]
push 0x24
push eax
call fcn.004022d9
add esp, 8
mov eax, esi
test esi, esi
jne 0x401a44
mov esi, dword [ebp - 0x10]
push 0x24
push dword [esi]
call fcn.004022d9
push 0x10
push esi
mov dword [0x40a324], 0
call fcn.004022d9
add esp, 0x10
mov eax, dword [0x40a320]
test eax, eax
je 0x401a96
push 4
push eax
mov dword [0x40a320], 0
call fcn.004022d9
add esp, 8
test edi, edi
je 0x401b2e
mov ecx, dword [ebp - 0x30]
mov eax, edi
sub ecx, edi
cmp ecx, 0x1000
jb 0x401b24
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401b24
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
test ecx, ecx
je 0x4018ac
mov al, byte [ebp - 0x34]
test al, al
je 0x401ad5
mov byte [ecx + 8], al
mov al, byte [ebp - 0x33]
test al, al
je 0x401adf
mov byte [ecx + 9], al
mov al, byte [ebp - 0x32]
test al, al
je 0x401ae9
mov byte [ecx + 0xa], al
mov al, byte [ebp - 0x31]
test al, al
je 0x401af3
mov byte [ecx + 0xb], al
mov al, byte [ebp - 0x30]
test al, al
je 0x401afd
mov byte [ecx + 0xc], al
mov al, byte [ebp - 0x2f]
test al, al
je 0x401b07
mov byte [ecx + 0xd], al
mov al, byte [ebp - 0x2e]
test al, al
je 0x401b11
mov byte [ecx + 0xe], al
mov al, byte [ebp - 0x2d]
test al, al
je 0x401907
mov byte [ecx + 0xf], al
jmp 0x401907
push ecx
push edi
call fcn.004022d9
add esp, 8
mov eax, dword [ebp - 0x24]
mov esi, dword [eax + 4]
cmp byte [esi + 0xd], 0
jne 0x401b66
nop word [eax + eax]
push dword [esi + 8]
lea eax, [ebp - 0x24]
push eax
mov ecx, eax
call fcn.00402110
mov eax, esi
mov esi, dword [esi]
push 0x18
push eax
call fcn.004022d9
add esp, 8
cmp byte [esi + 0xd], 0
je 0x401b40
mov eax, dword [ebp - 0x24]
push 0x18
push eax
call fcn.004022d9
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push str.list_too_long
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const__]
int3