Function at 0x51a610
Capabilities:
Check for time delay via gettickcount
Check if file exists
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x608e8d
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x6687b8]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov eax, dword [esp + 0x94]
mov ebp, dword [esp + 0x90]
xor esi, esi
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea edi, [esp + 0x1c]
mov dword [esp + 0x88], esi
mov dword [esp + 0x28], esi
call fcn.0047ac70
mov byte [esp + 0x88], 1
mov edi, dword [esp + 0x1c]
mov eax, dword [edi - 0xc]
cmp eax, esi
jle 0x51a6ae
lea ecx, [eax - 1]
cmp ecx, esi
jl 0x51a6f3
cmp ecx, eax
jg 0x51a6f3
movzx eax, word [edi + ecx*2]
cmp ax, 0x5c
je 0x51a6ae
push 0x5c
lea edi, [esp + 0x20]
call fcn.0040af90
mov edi, dword [esp + 0x1c]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x24]
push edx
mov ebx, str.user2.dict
call fcn.0040aab0
add esp, 8
mov byte [esp + 0x88], 2
mov eax, dword [esp + 0x20]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push eax
call esi
test eax, eax
je 0x51a6fd
mov ecx, dword [esp + 0x20]
push ecx
mov ecx, ebp
call fcn.005198c0
mov dword [esp + 0x28], eax
jmp 0x51a855
push 0x80070057
call fcn.00403650
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x28]
push eax
mov ebx, str.user.dict
call fcn.0040aab0
add esp, 8
mov byte [esp + 0x88], 3
mov ecx, dword [esp + 0x24]
push ecx
call esi
test eax, eax
je 0x51a752
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x30]
push eax
mov ebx, str..conv
call fcn.0040aab0
mov eax, dword [eax]
add esp, 8
push eax
mov ebx, 1
call esi
test eax, eax
jne 0x51a756
mov byte [esp + 0x1b], bl
jmp 0x51a75b
mov bl, byte [esp + 0x38]
mov byte [esp + 0x1b], 0
test bl, 1
je 0x51a780
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x51a780
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [esp + 0x1b], 0
mov ecx, dword [esp + 0x20]
je 0x51a79e
mov edx, dword [esp + 0x24]
push ebp
call fcn.00519e10
mov dword [esp + 0x28], eax
jmp 0x51a82d
xor esi, esi
push esi
push 0x80
push 4
push esi
push 3
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x51a7c3
call fcn.0040f010
jmp 0x51a7c6
mov dword [ebp + 0x28], eax
push 0x3c
lea edx, [esp + 0x44]
push esi
push edx
call fcn.005da970
mov ecx, dword [ebp + 0x28]
add esp, 0xc
push esi
lea eax, [esp + 0x34]
push eax
push esi
push ecx
mov dword [esp + 0x4c], 0x51554432
mov word [esp + 0x50], 3
mov word [esp + 0x52], si
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x51a80d
call fcn.0040f010
mov ecx, dword [ebp + 0x28]
push esi
lea edx, [esp + 0x30]
push edx
push 0x40
lea eax, [esp + 0x48]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, esi
jne 0x51a82d
call fcn.0040f010
mov byte [esp + 0x88], 2
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x51a855
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
mov byte [eax + 0x18], 1
mov eax, dword [esp + 0x34]
test eax, eax
je 0x51a86a
mov ecx, dword [esp + 0x28]
mov dword [eax], ecx
mov byte [esp + 0x88], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x51a892
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x88], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x51a8b6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor eax, eax
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.005d28b3
add esp, 0x78
ret 8