Function at 0x4057c5
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
push 0x104
lea eax, [ebp - 0x108]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
lea ecx, [ebp - 0x108]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
mov dword [ebp - 0x10c], eax
jmp 0x405808
mov edx, dword [ebp - 0x10c]
sub edx, 1
mov dword [ebp - 0x10c], edx
cmp dword [ebp - 0x10c], 0
jle 0x405852
mov eax, dword [ebp - 0x10c]
movsx ecx, byte [ebp + eax - 0x108]
cmp ecx, 0x2e
jne 0x405850
mov edx, dword [ebp - 0x10c]
mov byte [ebp + edx - 0x107], 0x43
mov eax, dword [ebp - 0x10c]
mov byte [ebp + eax - 0x106], 0x46
mov ecx, dword [ebp - 0x10c]
mov byte [ebp + ecx - 0x105], 0x47
jmp 0x405852
jmp 0x4057f9
push 0x40b8f8
lea edx, [ebp - 0x108]
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4058a6
lea eax, [ebp - 0x108]
push eax
push str.error:_I_cant_open_file__s_for_write._n_nSorry__but_I_cant_save_new_settings__
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x30
push 0
lea edx, [ebp - 0x20c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x405c76
mov ecx, dword [ebp - 4]
push ecx
push 8
push 1
push str.pk_cfg_4
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 8
je 0x4058c6
jmp 0x405c74
mov edx, dword [ebp - 4]
push edx
push 4
push 1
push 0x40c5dc
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x4058e6
jmp 0x405c72
mov eax, dword [ebp - 4]
push eax
push 4
push 1
push 0x40c5d8
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x405906
jmp 0x405c70
mov ecx, dword [0x40c5d0]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.DLL_SetPriorityClass]
mov edx, dword [0x40c5d0]
mov dword [ebp - 0x214], edx
mov eax, dword [ebp - 0x214]
sub eax, 0x20
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0xe0
ja case.0x40594f.4
mov edx, dword [ebp - 0x214]
xor ecx, ecx
mov cl, byte [edx + 0x405c8e]
jmp dword [ecx*4 + 0x405c7a]
mov dword [ebp - 0x210], 0
jmp case.0x40594f.4
mov dword [ebp - 0x210], 1
jmp case.0x40594f.4
mov dword [ebp - 0x210], 2
jmp case.0x40594f.4
mov dword [ebp - 0x210], 3
mov eax, dword [ebp - 4]
push eax
push 4
push 1
lea ecx, [ebp - 0x210]
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x4059a6
jmp 0x405c6e
mov edx, dword [ebp - 4]
push edx
push 4
push 1
push 0x40c488
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x4059c6
jmp 0x405c6c
mov eax, dword [ebp - 4]
push eax
push 4
push 1
push 0x40c4ac
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x4059e6
jmp 0x405c6a
mov ecx, dword [ebp - 4]
push ecx
push 4
push 1
push 0x40c4c0
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x405a06
jmp 0x405c68
mov edx, dword [ebp - 4]
push edx
push 4
push 1
push 0x40c4b8
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x405a26
jmp 0x405c66
mov eax, dword [ebp - 4]
push eax
push 4
push 1
push 0x40c4b4
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x405a46
jmp 0x405c64
mov ecx, dword [ebp - 4]
push ecx
push 4
push 1
push 0x40c4b0
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x405a66
jmp 0x405c62
mov edx, dword [ebp - 4]
push edx
push 4
push 1
push 0x40c4a8
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x405a86
jmp 0x405c60
mov eax, dword [ebp - 4]
push eax
push 4
push 1
push 0x40c4a4
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x405aa6
jmp 0x405c5e
mov ecx, dword [ebp - 4]
push ecx
push 4
push 1
push 0x40c4a0
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x405ac6
jmp 0x405c5c
mov edx, dword [ebp - 4]
push edx
push 4
push 1
push 0x40c5d4
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x405ae6
jmp 0x405c5a
mov eax, dword [ebp - 4]
push eax
push 0x10
push 1
push 0x40c490
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 0x10
je 0x405b06
jmp 0x405c58
mov ecx, dword [ebp - 4]
push ecx
push 4
push 1
push 0x40c5cc
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x405b26
jmp 0x405c56
mov edx, dword [ebp - 4]
push edx
push 4
push 1
push 0x40c484
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x405b46
jmp 0x405c54
mov eax, dword [ebp - 4]
push eax
push 4
push 1
push 0x40c480
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x405b66
jmp 0x405c52
mov ecx, dword [ebp - 4]
push ecx
push 4
push 1
push 0x40c47c
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x405b86
jmp 0x405c50
mov edx, dword [ebp - 4]
push edx
push 4
push 1
push 0x40c5c8
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x405ba6
jmp 0x405c4e
mov eax, dword [ebp - 4]
push eax
push 0x104
push 1
push 0x40c4c4
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 0x104
je 0x405bcb
jmp 0x405c4c
mov ecx, dword [ebp - 4]
push ecx
push 4
push 1
push 0x40c4bc
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 4
je 0x405be8
jmp 0x405c4a
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
call fcn.00406818
push 1
mov eax, dword [ebp + 8]
push eax
call fcn.004030da
add esp, 8
jmp 0x405c76
lea ecx, [ebp - 0x108]
push ecx
push str.error:_I_cant_write_in_file__s._n_nSorry__but_I_cant_save_new_settings__
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x30
push 0
lea eax, [ebp - 0x20c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
jmp 0x405c76
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
jmp 0x405c0a
mov esp, ebp
pop ebp
ret