Function at 0x1014670
Capabilities:
Write file on windows

Disassembly:
push rdi
sub rsp, 0x340
mov rax, qword [0x010657f0]
xor rax, rsp
mov qword [rsp + 0x330], rax
movzx eax, word [0x01001c38]
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 [0x01001c38]
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, [0x01067274]
mov edx, 0x112
lea rcx, [rsp + 0xf0]
call fcn.01013c30
lea r8, [0x010023d0]
mov edx, 0x112
lea rcx, [rsp + 0xf0]
call fcn.01015be0
mov eax, dword [0x01065ce4]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
je 0x1014767
mov r9d, dword [rsp + 0x40]
mov r8d, 0x75
xor edx, edx
mov ecx, 2
call fcn.01033fa0
xor ecx, ecx
call fcn.01014480
mov eax, dword [0x01065ce4]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
je 0x1014b41
mov r9d, dword [rsp + 0x40]
mov r8d, 0x76
xor edx, edx
mov ecx, 2
call fcn.01033fa0
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.01033fa0
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 0x1014a49
mov dword [rsp + 0x20], 0x80
lea r9, [rsp + 0x60]
lea r8, [0x01001c38]
lea rdx, [0x01002010]
lea rcx, [0x01001c00]
call fcn.01052500
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, [0x01065b50]
call qword [0x01068178]
test eax, eax
jne 0x1014943
cmp dword [0x010679c0], 0
je 0x1014936
cmp dword [0x01067484], 0
je 0x1014936
lea rdx, [0x01002458]
lea rcx, [0x01001b70]
call qword [sym.imp.MSVCR80.dll_wprintf]
lea rcx, [0x01065b50]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x010679c0], 0
je 0x1014969
cmp dword [0x01067484], 0
je 0x1014969
lea rdx, [0x01002458]
lea rcx, [0x01001b38]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x50], 0
jmp 0x101497e
mov eax, dword [rsp + 0x50]
add eax, 1
mov dword [rsp + 0x50], eax
mov eax, dword [0x01065ce4]
cmp dword [rsp + 0x50], eax
jge 0x1014a08
mov edx, dword [rsp + 0x50]
lea rcx, [0x01065cd8]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x1014a03
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 0x1014973
lea rcx, [0x01065b50]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010679c0], 0
je 0x1014a3b
cmp dword [0x01067484], 0
je 0x1014a3b
lea rdx, [0x01002458]
lea rcx, [0x01001b00]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov rcx, qword [rsp + 0xe8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [0x01065b50]
call qword [0x01068178]
test eax, eax
jne 0x1014a8d
cmp dword [0x010679c0], 0
je 0x1014a80
cmp dword [0x01067484], 0
je 0x1014a80
lea rdx, [0x01002458]
lea rcx, [0x01001b70]
call qword [sym.imp.MSVCR80.dll_wprintf]
lea rcx, [0x01065b50]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x010679c0], 0
je 0x1014ab3
cmp dword [0x01067484], 0
je 0x1014ab3
lea rdx, [0x01002458]
lea rcx, [0x01001b38]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x50], 0
jmp 0x1014ac8
mov eax, dword [rsp + 0x50]
add eax, 1
mov dword [rsp + 0x50], eax
mov eax, dword [0x01065ce4]
cmp dword [rsp + 0x50], eax
jge 0x1014b0e
mov edx, dword [rsp + 0x50]
lea rcx, [0x01065cd8]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x1014b0c
mov rax, qword [rsp + 0x48]
cmp qword [rax + 0x10], 0
je 0x1014b0c
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0x10]
call fcn.01015550
jmp 0x1014abd
lea rcx, [0x01065b50]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010679c0], 0
je 0x1014b41
cmp dword [0x01067484], 0
je 0x1014b41
lea rdx, [0x01002458]
lea rcx, [0x01001b00]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov rcx, qword [rsp + 0x330]
xor rcx, rsp
call fcn.010588f0
add rsp, 0x340
pop rdi
ret