Function at 0x405fc0
Capabilities:
Move file
Terminate process
Write file on windows

Disassembly:
push ebp
xor ecx, ecx
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1dc
mov dword [ebp - 0x1a4], ecx
mov dword [ebp - 0x1a0], eax
mov dword [esp], 0
call sub.cygwin1.dll_time
mov dword [ebp - 0x1ac], eax
call sub.cygwin1.dll_getpid
mov dword [esp + 0xc], eax
mov eax, 0x100
mov edx, str.temp__d.rdb
mov dword [esp + 4], eax
lea eax, [ebp - 0x118]
mov dword [esp + 8], edx
mov dword [esp], eax
call sub.cygwin1.dll_snprintf
mov eax, 0x413e19
lea edx, [ebp - 0x118]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.cygwin1.dll__fopen64
test eax, eax
mov esi, eax
je 0x406466
mov dword [esp + 0xc], eax
mov eax, 1
mov dword [esp + 8], eax
mov eax, 9
mov dword [esp + 4], eax
mov dword [esp], str.REDIS0001
call sub.cygwin1.dll_fwrite
test eax, eax
je 0x406180
mov edx, dword [0x4161ac]
xor eax, eax
mov dword [ebp - 0x1a8], eax
cmp edx, 0
jle 0x4060b6
xor edi, edi
mov dword [ebp - 0x1c4], edi
nop
lea esi, [esi]
mov ecx, dword [ebp - 0x1c4]
mov ebx, dword [0x416050]
add ecx, ebx
mov dword [ebp - 0x1b0], ecx
mov eax, dword [ecx]
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x4061e6
inc dword [ebp - 0x1a8]
add dword [ebp - 0x1c4], 0xc
cmp edx, dword [ebp - 0x1a8]
jg 0x406080
mov edx, 0xff
mov eax, esi
call fcn.00404060
inc eax
je 0x406180
mov dword [esp], esi
call sub.cygwin1.dll_fflush
mov dword [esp], esi
call sub.cygwin1.dll_fileno
mov dword [esp], eax
call sub.cygwin1.dll_fsync
mov dword [esp], esi
call sub.cygwin1.dll_fclose
mov ecx, dword [ebp - 0x1a0]
lea eax, [ebp - 0x118]
mov dword [esp], eax
mov dword [esp + 4], ecx
call sub.cygwin1.dll_rename
inc eax
je 0x4064b6
mov dword [esp], 1
mov edi, str.DB_saved_on_disk
xor esi, esi
mov dword [esp + 4], edi
xor ebx, ebx
call fcn.00403610
mov dword [0x416060], esi
mov dword [0x416064], ebx
mov dword [esp], 0
call sub.cygwin1.dll_time
mov dword [0x416180], eax
add esp, 0x1dc
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [edi]
mov dword [esp], ebx
call fcn.004012a0
mov edx, dword [ebx + 0x14]
mov eax, esi
call fcn.004040a0
jmp 0x40617b
mov dword [esp], ebx
call fcn.00401310
test eax, eax
je 0x406230
mov edx, dword [eax + 8]
mov eax, esi
call fcn.00405f60
inc eax
jne 0x406161
nop
mov dword [esp], esi
call sub.cygwin1.dll_fclose
lea ecx, [ebp - 0x118]
mov dword [esp], ecx
call sub.cygwin1.dll_unlink
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [esp], eax
call sub.cygwin1.dll_strerror
mov dword [esp + 8], eax
mov ecx, str.Write_error_saving_DB_on_disk:__s
mov dword [esp + 4], ecx
mov dword [esp], 2
call fcn.00403610
mov edx, dword [ebp - 0x1a4]
test edx, edx
je 0x4061d6
mov eax, dword [ebp - 0x1a4]
mov dword [esp], eax
call fcn.00402e20
mov eax, 0xffffffff
add esp, 0x1dc
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], eax
call fcn.00402da0
mov dword [ebp - 0x1a4], eax
test eax, eax
je 0x4064a9
mov edx, 0xfe
mov eax, esi
call fcn.00404060
inc eax
je 0x406180
mov edx, dword [ebp - 0x1a8]
mov eax, esi
call fcn.004040a0
inc eax
je 0x406180
lea esi, [esi]
lea edi, [edi]
mov eax, dword [ebp - 0x1a4]
mov dword [esp], eax
call fcn.00402dd0
test eax, eax
je 0x40644d
mov edx, dword [eax]
mov edi, dword [eax + 4]
mov eax, dword [ebp - 0x1b0]
mov dword [ebp - 0x1b4], edx
call fcn.004044f0
cmp eax, 0xffffffff
mov ebx, eax
je 0x4062b0
cmp eax, dword [ebp - 0x1ac]
jl 0x406230
mov edx, 0xfd
mov eax, esi
call fcn.00404060
inc eax
je 0x406180
mov dword [ebp - 0x19c], ebx
mov eax, 1
mov dword [esp + 8], eax
mov eax, 4
mov dword [esp + 4], eax
lea eax, [ebp - 0x19c]
mov dword [esp + 0xc], esi
mov dword [esp], eax
call sub.cygwin1.dll_fwrite
test eax, eax
je 0x406180
movzx edx, byte [edi + 4]
mov eax, esi
call fcn.00404060
inc eax
je 0x406180
mov edx, dword [ebp - 0x1b4]
mov eax, esi
call fcn.00405f60
inc eax
je 0x406180
movzx eax, byte [edi + 4]
test al, al
je 0x4063fc
cmp al, 1
je 0x40614b
cmp al, 2
je 0x406417
cmp al, 3
jne 0x406493
mov ebx, dword [edi]
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00402da0
mov edi, eax
mov eax, dword [ebx]
mov edx, dword [eax + 0x10]
mov eax, esi
call fcn.004040a0
inc eax
jmp 0x406344
mov byte [ebp - 0x198], 0xfd
mov ecx, 1
mov dword [esp + 0xc], esi
mov eax, 1
mov dword [esp + 8], eax
lea eax, [ebp - 0x198]
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.cygwin1.dll_fwrite
test eax, eax
je 0x406180
mov dword [esp], edi
call fcn.00402dd0
test eax, eax
je 0x40640a
mov edx, dword [eax]
mov ebx, dword [eax + 4]
mov eax, esi
call fcn.00405f60
inc eax
je 0x406180
fld qword [ebx]
fst qword [ebp - 0x1c0]
fstp qword [esp]
call sub.cygwin1.dll___fpclassifyd
test eax, eax
je 0x406317
fld qword [ebp - 0x1c0]
fstp qword [esp]
call sub.cygwin1.dll___fpclassifyd
cmp eax, 1
ja 0x4063b9
fld qword [ebp - 0x1c0]
mov ecx, 1
fldz
fucompp
fnstsw ax
sahf
jbe 0x4063b5
mov dl, 0xff
mov byte [ebp - 0x198], dl
jmp 0x406323
mov dl, 0xfe
jmp 0x4063aa
fld qword [ebp - 0x1c0]
mov eax, str._.17g
lea ebx, [ebp - 0x197]
mov dword [esp + 8], eax
mov eax, 0x7f
fstp qword [esp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.cygwin1.dll_snprintf
mov dword [esp], ebx
call sub.cygwin1.dll_strlen
mov byte [ebp - 0x198], al
movzx eax, al
lea ecx, [eax + 1]
jmp 0x406323
mov edx, edi
mov eax, esi
call fcn.00405f60
jmp 0x40621c
mov dword [esp], edi
call fcn.00402e20
jmp 0x406230
mov ebx, dword [edi]
mov dword [esp], ebx
call fcn.00402da0
mov edx, dword [ebx + 0x10]
mov edi, eax
mov eax, esi
call fcn.004040a0
jmp 0x406445
mov dword [esp], edi
call fcn.00402dd0
test eax, eax
je 0x40640a
mov edx, dword [eax]
mov eax, esi
call fcn.00405f60
inc eax
jne 0x406430
jmp 0x406180
mov edx, dword [ebp - 0x1a4]
mov dword [esp], edx
call fcn.00402e20
mov edx, dword [0x4161ac]
jmp 0x4060a1
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [esp], eax
call sub.cygwin1.dll_strerror
mov dword [esp + 8], eax
mov eax, str.Failed_saving_the_DB:__s
mov dword [esp + 4], eax
mov dword [esp], 2
call fcn.00403610
jmp 0x4061d6
mov eax, str.0___0
call fcn.004039e0
mov dword [esp], 1
call sub.cygwin1.dll_exit
mov dword [esp], esi
call sub.cygwin1.dll_fclose
jmp 0x4061d6
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [esp], eax
call sub.cygwin1.dll_strerror
mov dword [esp + 8], eax
mov eax, str.Error_moving_temp_DB_file_on_the_final_destination:__s
mov dword [esp + 4], eax
mov dword [esp], 2
call fcn.00403610
lea edx, [ebp - 0x118]
mov dword [esp], edx
call sub.cygwin1.dll_unlink
jmp 0x4061d6