Function at 0x104d120
Capabilities:
Delete file
Read file on windows

Disassembly:
push rdi
sub rsp, 0x4b0
mov rax, qword [0x010657f0]
xor rax, rsp
mov qword [rsp + 0x4a8], rax
movzx eax, word [0x01001c38]
mov word [rsp + 0xa0], ax
lea rax, [rsp + 0xa2]
mov rdi, rax
xor eax, eax
mov ecx, 0x3fe
rep stosb byte [rdi], al
mov dword [rsp + 0x90], 0
mov qword [rsp + 0x50], 0xffffffffffffffff
mov dword [rsp + 0x44], 0
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x4a0], 0
lea rcx, [0x0100b260]
call fcn.01052e60
lea r8, [0x01067274]
mov edx, 0x200
lea rcx, [rsp + 0xa0]
call fcn.01013c30
lea r8, [0x0100b1c8]
mov edx, 0x200
lea rcx, [rsp + 0xa0]
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 + 0xa0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0xffffffffffffffff
jne 0x104d240
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0xa0]
mov r8d, 0x1a3
xor edx, edx
mov ecx, 1
call fcn.01033fa0
xor eax, eax
jmp 0x104d621
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x90]
mov r8d, 4
lea rdx, [rsp + 0x44]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x104d299
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0xa0]
mov r8d, 0x1a3
xor edx, edx
mov ecx, 1
call fcn.01033fa0
jmp 0x104d5ca
cmp dword [rsp + 0x44], 0x6acfc0
jge 0x104d2c4
mov r9d, dword [rsp + 0x44]
mov r8d, 0xea
xor edx, edx
mov ecx, 1
call fcn.01033fa0
jmp 0x104d5ca
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x90]
mov r8d, 4
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x104d31d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0xa0]
mov r8d, 0x1a3
xor edx, edx
mov ecx, 1
call fcn.01033fa0
jmp 0x104d5ca
cmp dword [rsp + 0x40], 0
je 0x104d5ca
lea rcx, [rsp + 0xa0]
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, [0x01065a38]
call qword [0x01068178]
test eax, eax
jne 0x104d396
cmp dword [0x010679c0], 0
je 0x104d389
cmp dword [0x01067484], 0
je 0x104d389
lea rdx, [0x0100b230]
lea rcx, [0x01001b70]
call qword [sym.imp.MSVCR80.dll_wprintf]
lea rcx, [0x01065a38]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x010679c0], 0
je 0x104d3bc
cmp dword [0x01067484], 0
je 0x104d3bc
lea rdx, [0x0100b230]
lea rcx, [0x01001b38]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x48], 0
jmp 0x104d3d1
mov eax, dword [rsp + 0x48]
add eax, 1
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x48], eax
jge 0x104d597
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x90]
mov r8d, gethostbyname
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x104d46b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0xa0]
mov r8d, 0x1a3
xor edx, edx
mov ecx, 1
call fcn.01033fa0
lea rcx, [0x01065a38]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010679c0], 0
je 0x104d461
cmp dword [0x01067484], 0
je 0x104d461
lea rdx, [0x0100b230]
lea rcx, [0x01001b00]
call qword [sym.imp.MSVCR80.dll_wprintf]
jmp 0x104d5ca
mov eax, dword [rsp + 0x90]
cmp rax, 0x30
jne 0x104d592
mov r8d, 0x386
lea rdx, [0x0100b230]
mov ecx, dword [rsp + 0x80]
call fcn.01014dd0
mov qword [rsp + 0x88], rax
cmp qword [rsp + 0x88], 0
je 0x104d592
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x90]
mov r8d, dword [rsp + 0x80]
mov rdx, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x104d52a
mov eax, dword [rsp + 0x80]
cmp dword [rsp + 0x90], eax
jne 0x104d52a
lea rax, [fcn.01046df0]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [0x01065c78]
call qword [sym.imp.SQLSVC.dll_SHRecMemBSInsert]
mov eax, dword [rsp + 0x4a0]
add eax, 1
mov dword [rsp + 0x4a0], eax
jmp 0x104d592
mov rcx, qword [rsp + 0x88]
call fcn.01015550
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0xa0]
mov r8d, 0x1a3
xor edx, edx
mov ecx, 1
call fcn.01033fa0
lea rcx, [0x01065a38]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010679c0], 0
je 0x104d58e
cmp dword [0x01067484], 0
je 0x104d58e
lea rdx, [0x0100b230]
lea rcx, [0x01001b00]
call qword [sym.imp.MSVCR80.dll_wprintf]
jmp 0x104d5ca
jmp 0x104d3c6
lea rcx, [0x01065a38]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010679c0], 0
je 0x104d5ca
cmp dword [0x01067484], 0
je 0x104d5ca
lea rdx, [0x0100b230]
lea rcx, [0x01001b00]
call qword [sym.imp.MSVCR80.dll_wprintf]
cmp qword [rsp + 0x50], 0xffffffffffffffff
je 0x104d5eb
lea rcx, [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x4a0]
cmp dword [rsp + 0x40], eax
je 0x104d61a
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x4a0]
mov r8d, 0x133
xor edx, edx
mov ecx, 2
call fcn.01033fa0
mov eax, dword [rsp + 0x4a0]
mov rcx, qword [rsp + 0x4a8]
xor rcx, rsp
call fcn.010588f0
add rsp, 0x4b0
pop rdi
ret