Function at 0x1014890
Capabilities:
Write file on windows

Disassembly:
push rdi
sub rsp, 0x340
mov rax, qword [0x010667f0]
xor rax, rsp
mov qword [rsp + 0x330], rax
movzx eax, word [0x01001c50]
mov word [rsp + 0xf0], ax
lea rax, [rsp + 0xf2]
mov rdi, rax
xor eax, eax
mov ecx, 0x222
rep stosb byte [rdi], al
movzx eax, word [0x01001c50]
mov word [rsp + 0x60], ax
lea rax, [rsp + 0x62]
mov rdi, rax
xor eax, eax
mov ecx, 0x7e
rep stosb byte [rdi], al
mov dword [rsp + 0x320], 0
mov dword [rsp + 0x50], 0
mov dword [rsp + 0x40], 0
mov dword [rsp + 0xe0], 0
mov qword [rsp + 0xe8], 0
mov qword [rsp + 0x48], 0
lea r8, [0x01068274]
mov edx, 0x112
lea rcx, [rsp + 0xf0]
call fcn.0105ab90
lea r8, [0x010023f0]
mov edx, 0x112
lea rcx, [rsp + 0xf0]
call fcn.01015bf0
mov eax, dword [0x01066ce4]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
je 0x1014987
mov r9d, dword [rsp + 0x40]
mov r8d, 0x75
xor edx, edx
mov ecx, 2
call fcn.01034b80
xor ecx, ecx
call fcn.010146a0
mov eax, dword [0x01066ce4]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
je 0x1014d61
mov r9d, dword [rsp + 0x40]
mov r8d, 0x76
xor edx, edx
mov ecx, 2
call fcn.01034b80
lea rcx, [rsp + 0xf0]
call qword [sym.imp.MSVCR80.dll__wcslwr]
mov r9, rax
mov r8d, 0x77
xor edx, edx
mov ecx, 2
call fcn.01034b80
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x100080
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rsp + 0xf0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0xe8], rax
cmp qword [rsp + 0xe8], 0xffffffffffffffff
je 0x1014c69
mov dword [rsp + 0x20], 0x80
lea r9, [rsp + 0x60]
lea r8, [0x01001c50]
lea rdx, [0x01002020]
lea rcx, [0x01001c10]
call fcn.010531b0
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCR80.dll__wtol]
mov dword [rsp + 0xe0], eax
mov eax, dword [rsp + 0xe0]
cdq
mov ecx, 0x186a0
idiv ecx
imul eax, eax, 0xf4240
mov dword [rsp + 0x324], eax
mov eax, dword [rsp + 0xe0]
cdq
mov ecx, 0x186a0
idiv ecx
mov eax, edx
cdq
mov ecx, 0x3e8
idiv ecx
imul eax, eax, 0x2710
mov ecx, dword [rsp + 0x324]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x328], eax
mov eax, dword [rsp + 0xe0]
cdq
mov ecx, 0x3e8
idiv ecx
mov eax, edx
mov ecx, dword [rsp + 0x328]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0xe0], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x320]
mov r8d, 4
lea rdx, [rsp + 0xe0]
mov rcx, qword [rsp + 0xe8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x320]
mov r8d, 4
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0xe8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea rcx, [0x01066b50]
call qword [0x01069178]
test eax, eax
jne 0x1014b63
cmp dword [0x010689c0], 0
je 0x1014b56
cmp dword [0x01068484], 0
je 0x1014b56
lea rdx, [0x01002478]
lea rcx, [0x01001b80]
call qword [sym.imp.MSVCR80.dll_wprintf]
lea rcx, [0x01066b50]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x010689c0], 0
je 0x1014b89
cmp dword [0x01068484], 0
je 0x1014b89
lea rdx, [0x01002478]
lea rcx, [0x01001b48]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x50], 0
jmp 0x1014b9e
mov eax, dword [rsp + 0x50]
add eax, 1
mov dword [rsp + 0x50], eax
mov eax, dword [0x01066ce4]
cmp dword [rsp + 0x50], eax
jge 0x1014c28
mov edx, dword [rsp + 0x50]
lea rcx, [0x01066cd8]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x1014c23
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x320]
mov r8d, 0x20
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0xe8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x320]
mov rax, qword [rsp + 0x48]
mov r8d, dword [rax + 8]
mov rax, qword [rsp + 0x48]
mov rdx, qword [rax + 0x10]
mov rcx, qword [rsp + 0xe8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x1014b93
lea rcx, [0x01066b50]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010689c0], 0
je 0x1014c5b
cmp dword [0x01068484], 0
je 0x1014c5b
lea rdx, [0x01002478]
lea rcx, [0x01001b10]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov rcx, qword [rsp + 0xe8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [0x01066b50]
call qword [0x01069178]
test eax, eax
jne 0x1014cad
cmp dword [0x010689c0], 0
je 0x1014ca0
cmp dword [0x01068484], 0
je 0x1014ca0
lea rdx, [0x01002478]
lea rcx, [0x01001b80]
call qword [sym.imp.MSVCR80.dll_wprintf]
lea rcx, [0x01066b50]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x010689c0], 0
je 0x1014cd3
cmp dword [0x01068484], 0
je 0x1014cd3
lea rdx, [0x01002478]
lea rcx, [0x01001b48]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x50], 0
jmp 0x1014ce8
mov eax, dword [rsp + 0x50]
add eax, 1
mov dword [rsp + 0x50], eax
mov eax, dword [0x01066ce4]
cmp dword [rsp + 0x50], eax
jge 0x1014d2e
mov edx, dword [rsp + 0x50]
lea rcx, [0x01066cd8]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x1014d2c
mov rax, qword [rsp + 0x48]
cmp qword [rax + 0x10], 0
je 0x1014d2c
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0x10]
call fcn.01015770
jmp 0x1014cdd
lea rcx, [0x01066b50]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010689c0], 0
je 0x1014d61
cmp dword [0x01068484], 0
je 0x1014d61
lea rdx, [0x01002478]
lea rcx, [0x01001b10]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov rcx, qword [rsp + 0x330]
xor rcx, rsp
call fcn.01059ab0
add rsp, 0x340
pop rdi
ret