Function at 0x1013ca0
Capabilities:
Read file on windows

Disassembly:
mov dword [rsp + 8], ecx
push rdi
mov eax, 0x1030
call fcn.0105ee40
sub rsp, rax
mov rax, qword [0x010657f0]
xor rax, rsp
mov qword [rsp + 0x1028], rax
movzx eax, word [0x01001c38]
mov word [rsp + 0xcc0], ax
lea rax, [rsp + 0xcc2]
mov rdi, rax
xor eax, eax
mov ecx, 0x222
rep stosb byte [rdi], al
movzx eax, word [0x01001c38]
mov word [rsp + 0x870], ax
lea rax, [rsp + 0x872]
mov rdi, rax
xor eax, eax
mov ecx, 0x3fe
rep stosb byte [rdi], al
movzx eax, word [0x01001c38]
mov word [rsp + 0xf00], ax
lea rax, [rsp + 0xf02]
mov rdi, rax
xor eax, eax
mov ecx, 0xfe
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, 0x7fe
rep stosb byte [rdi], al
mov dword [rsp + 0xcb0], 0
mov dword [rsp + 0x860], 0
mov dword [rsp + 0xc74], 0
mov dword [rsp + 0x40], 0
mov dword [rsp + 0xc78], 0
mov dword [rsp + 0xc70], 0
mov qword [rsp + 0xef0], 0
mov qword [rsp + 0xca8], 0
mov dword [rsp + 0xca0], 0
mov qword [rsp + 0x48], 0
mov r8d, 0x20
xor edx, edx
lea rcx, [rsp + 0xc80]
call sub.MSVCR80.dll_memset
lea r8, [0x01067274]
mov edx, 0x112
lea rcx, [rsp + 0xcc0]
call fcn.01013c30
lea r8, [0x010023d0]
mov edx, 0x112
lea rcx, [rsp + 0xcc0]
call fcn.01015be0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x100080
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
lea rcx, [rsp + 0xcc0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0xca8], rax
cmp qword [rsp + 0xca8], 0xffffffffffffffff
je 0x101442c
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xcb0]
mov r8d, 4
lea rdx, [rsp + 0xc74]
mov rcx, qword [rsp + 0xca8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1013eaa
lea r9, [0x01001c18]
mov r8d, 0xe9
xor edx, edx
mov ecx, 1
call fcn.01033fa0
mov rcx, qword [rsp + 0xca8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x101442c
cmp dword [rsp + 0xc74], 0x6acfc0
jge 0x1013ee9
mov r9d, dword [rsp + 0xc74]
mov r8d, 0xea
xor edx, edx
mov ecx, 1
call fcn.01033fa0
mov rcx, qword [rsp + 0xca8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x101442c
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xcb0]
mov r8d, 4
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0xca8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1013f48
lea r9, [0x01001c18]
mov r8d, 0xe9
xor edx, edx
mov ecx, 1
call fcn.01033fa0
mov rcx, qword [rsp + 0xca8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x101442c
lea rcx, [rsp + 0xcc0]
call qword [sym.imp.MSVCR80.dll__wcslwr]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x40]
mov r8d, WSAStartup
xor edx, edx
mov ecx, 2
call fcn.01033fa0
lea rcx, [0x01065b50]
call qword [0x01068178]
test eax, eax
jne 0x1013fb6
cmp dword [0x010679c0], 0
je 0x1013fa9
cmp dword [0x01067484], 0
je 0x1013fa9
lea rdx, [0x010023a8]
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 0x1013fdc
cmp dword [0x01067484], 0
je 0x1013fdc
lea rdx, [0x010023a8]
lea rcx, [0x01001b38]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x860], 0
jmp 0x1013ffa
mov eax, dword [rsp + 0x860]
add eax, 1
mov dword [rsp + 0x860], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x860], eax
jge 0x1014135
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xcb0]
mov r8d, 0x20
lea rdx, [rsp + 0x1000]
mov rcx, qword [rsp + 0xca8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1014130
mov eax, dword [rsp + 0xcb0]
cmp rax, 0x20
jne 0x1014130
mov r8d, 0x7c9
lea rdx, [0x010023a8]
mov ecx, dword [rsp + 0x1008]
call fcn.01014dd0
mov qword [rsp + 0x1010], rax
cmp qword [rsp + 0x1010], 0
je 0x1014130
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xcb0]
mov r8d, dword [rsp + 0x1008]
mov rdx, qword [rsp + 0x1010]
mov rcx, qword [rsp + 0xca8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1014130
mov eax, dword [rsp + 0x1008]
cmp dword [rsp + 0xcb0], eax
jne 0x1014130
lea rdx, [rsp + 0x1000]
lea rcx, [0x01065cd8]
call qword [sym.imp.SQLSVC.dll_SHRecMemAdd]
cmp dword [rsp + 0x1004], 0
jb 0x101410e
cmp dword [rsp + 0x1004], 7
jae 0x101410e
mov eax, dword [rsp + 0x1004]
mov eax, dword [rsp + rax*4 + 0xc80]
add eax, 1
mov ecx, dword [rsp + 0x1004]
mov dword [rsp + rcx*4 + 0xc80], eax
jmp 0x101411f
mov eax, dword [rsp + 0xc9c]
add eax, 1
mov dword [rsp + 0xc9c], eax
mov eax, dword [rsp + 0xc78]
add eax, 1
mov dword [rsp + 0xc78], eax
jmp 0x1013fe9
lea rcx, [0x01065b50]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010679c0], 0
je 0x1014168
cmp dword [0x01067484], 0
je 0x1014168
lea rdx, [0x010023a8]
lea rcx, [0x01001b00]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov rcx, qword [rsp + 0xca8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r9d, 0x400
lea r8, [rsp + 0x60]
mov edx, WSAStartup
mov rcx, qword [0x01068158]
call qword [sym.imp.USER32.dll_LoadStringW]
mov dword [rsp + 0xca0], 0
jmp 0x10141b1
mov eax, dword [rsp + 0xca0]
add eax, 1
mov dword [rsp + 0xca0], eax
movsxd rax, dword [rsp + 0xca0]
cmp rax, 8
jae 0x101424c
movsxd rax, dword [rsp + 0xca0]
cmp dword [rsp + rax*4 + 0xc80], 0
je 0x1014247
mov eax, dword [rsp + 0xca0]
add eax, 0x28
mov r9d, 0x200
lea r8, [rsp + 0x870]
mov edx, eax
mov rcx, qword [0x01068158]
call qword [sym.imp.USER32.dll_LoadStringW]
movsxd rax, dword [rsp + 0xca0]
mov eax, dword [rsp + rax*4 + 0xc80]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0x870]
lea r8, [0x01002390]
mov edx, 0x80
lea rcx, [rsp + 0xf00]
call fcn.01015ef0
lea r8, [rsp + 0xf00]
mov edx, 0x400
lea rcx, [rsp + 0x60]
call fcn.01015be0
jmp 0x10141a0
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCR80.dll_wcslen]
mov qword [rsp + 0xef0], rax
cmp qword [rsp + 0xef0], 2
jb 0x1014279
mov rax, qword [rsp + 0xef0]
mov word [rsp + rax*2 + 0x5c], 0
lea r9, [rsp + 0x60]
xor r8d, r8d
lea rdx, [0x01001bbc]
mov ecx, 2
call fcn.01033fa0
cmp dword [rsp + 0x1040], 0
je 0x101442c
lea rcx, [rsp + 0xcc0]
call qword [sym.imp.MSVCR80.dll__wcslwr]
mov rcx, rax
call fcn.01014480
mov eax, dword [0x01065ce4]
mov ecx, dword [rsp + 0xc78]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0xc70], eax
mov eax, dword [0x01065ce4]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
je 0x101442c
mov r9d, dword [rsp + 0x40]
mov r8d, 0x76
xor edx, edx
mov ecx, 2
call fcn.01033fa0
mov r9d, dword [rsp + 0x40]
mov r8d, 0x100
xor edx, edx
mov ecx, 2
call fcn.01033fa0
lea rcx, [0x01065b50]
call qword [0x01068178]
test eax, eax
jne 0x1014355
cmp dword [0x010679c0], 0
je 0x1014348
cmp dword [0x01067484], 0
je 0x1014348
lea rdx, [0x010023a8]
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 0x101437b
cmp dword [0x01067484], 0
je 0x101437b
lea rdx, [0x010023a8]
lea rcx, [0x01001b38]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x860], 0
jmp 0x1014399
mov eax, dword [rsp + 0x860]
add eax, 1
mov dword [rsp + 0x860], eax
mov eax, dword [0x01065ce4]
cmp dword [rsp + 0x860], eax
jge 0x10143f9
mov edx, dword [rsp + 0x860]
lea rcx, [0x01065cd8]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x10143f7
mov rax, qword [rsp + 0x48]
cmp qword [rax + 0x10], 0
je 0x10143e3
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0x10]
call fcn.01015550
mov edx, dword [rsp + 0x860]
lea rcx, [0x01065cd8]
call qword [sym.imp.SQLSVC.dll_SHRecMemDelete]
jmp 0x1014388
lea rcx, [0x01065b50]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010679c0], 0
je 0x101442c
cmp dword [0x01067484], 0
je 0x101442c
lea rdx, [0x010023a8]
lea rcx, [0x01001b00]
call qword [sym.imp.MSVCR80.dll_wprintf]
cmp dword [rsp + 0x1040], 0
je 0x1014446
mov eax, dword [rsp + 0xc70]
mov dword [rsp + 0x1020], eax
jmp 0x1014454
mov eax, dword [rsp + 0xc78]
mov dword [rsp + 0x1020], eax
mov eax, dword [rsp + 0x1020]
mov rcx, qword [rsp + 0x1028]
xor rcx, rsp
call fcn.010588f0
add rsp, 0x1030
pop rdi
ret