Function at 0x412340
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x590dc9
push eax
mov eax, 0x195c
mov dword fs:[0], esp
call fcn.00554450
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 4], 0
lea eax, [esi + 0x2c]
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x10], 0
call fcn.00410fa0
mov byte [ebp - 4], 1
mov ecx, esi
call fcn.00410ec0
lea ecx, [ebp - 0x1958]
mov dword [ebp - 0x1c], ecx
lea ecx, [ebp - 0x1948]
mov ebx, eax
call fcn.0043f590
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1930]
call fcn.0043f590
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x1918]
call fcn.0043f590
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x1900]
call fcn.0043f590
mov byte [ebp - 4], 7
mov eax, dword [ebp + 0x18]
lea eax, [eax + eax + 3]
lea edi, [eax + 0x10]
push edi
push 8
mov byte [ebp - 0x1968], 0x6f
mov dword [ebp - 0x1964], 3
mov dword [ebp - 0x195c], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x412613
push 0x10
lea edx, [ebp - 0x1968]
push edx
push edi
push esi
call fcn.00554202
mov eax, dword [ebp + 8]
add esp, 0x10
cmp dword [ebp + 0x1c], 8
jae 0x41242c
lea eax, [ebp + 8]
mov ecx, dword [ebp + 0x18]
lea edx, [ecx + ecx]
push edx
push eax
lea eax, [esi + 0x10]
push edi
push eax
call fcn.00554202
mov edx, dword [ebp + 0x18]
push 1
lea ecx, [ebp + 0x24]
push ecx
lea eax, [esi + edx*2 + 0x12]
push edi
push eax
call fcn.00554202
add esp, 0x20
push 0
lea ecx, [ebp - 0x20]
push ecx
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor edi, edi
cmp eax, edi
jne 0x4124e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nError_occurred_while_writing_to_SH_ENABLE_TASK_the_server:__d
call fcn.00554fbd
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1968]
call fcn.004110a0
mov byte [ebp - 4], 0
cmp byte [ebp - 0x10], 0
je 0x4124bb
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 0x10], 0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x1c], 8
jb 0x4124d4
mov eax, dword [ebp + 8]
push eax
call fcn.00448f11
add esp, 4
xor ecx, ecx
mov dword [ebp + 0x18], edi
mov word [ebp + 8], cx
jmp 0x4126a1
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push edi
lea edx, [ebp - 0x20]
push edx
push 4
lea eax, [ebp - 0x18]
push eax
push ebx
mov dword [ebp - 0x18], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, edi
jne 0x4125a7
cmp eax, 0xea
je 0x41255f
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1968]
call fcn.004110a0
mov byte [ebp - 4], 0
cmp byte [ebp - 0x10], 0
je 0x41254b
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 0x10], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.00401cb0
jmp 0x4126a8
cmp dword [ebp - 0x18], 0x6f
je 0x4125a7
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1968]
call fcn.004110a0
mov byte [ebp - 4], 0
cmp byte [ebp - 0x10], 0
je 0x412593
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 0x10], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.00401cb0
jmp 0x4126a8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1968]
call fcn.004110a0
mov byte [ebp - 4], 0
cmp byte [ebp - 0x10], 0
je 0x4125d5
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 0x10], 0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x1c], 8
jb 0x4125ee
mov ecx, dword [ebp + 8]
push ecx
call fcn.00448f11
add esp, 4
mov dword [ebp + 0x18], edi
pop edi
xor edx, edx
pop esi
mov dword [ebp + 0x1c], 7
mov word [ebp + 8], dx
mov al, 1
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x20
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
lea eax, [ebp - 0x1958]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x1900]
call fcn.00401000
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x1918]
call fcn.00401000
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x1930]
call fcn.00401000
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1948]
call fcn.00401000
mov byte [ebp - 4], 0
cmp byte [ebp - 0x10], 0
je 0x41267b
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 0x10], 0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x1c], 8
jb 0x412694
mov edx, dword [ebp + 8]
push edx
call fcn.00448f11
add esp, 4
xor eax, eax
mov dword [ebp + 0x18], 0
mov word [ebp + 8], ax
mov dword [ebp + 0x1c], 7
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor al, al
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x20