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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x590f78
push eax
mov eax, 0x1960
mov dword fs:[0], esp
call fcn.00554450
push ebx
push esi
mov esi, ecx
lea eax, [esi + 0x2c]
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], eax
mov byte [ebp - 0x14], 0
call fcn.00410fa0
mov dword [ebp - 4], 0
mov ecx, esi
call fcn.00410ec0
lea ecx, [ebp - 0x195c]
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x194c]
mov ebx, eax
call fcn.0043f590
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1934]
call fcn.0043f590
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x191c]
call fcn.0043f590
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x1904]
call fcn.0043f590
mov byte [ebp - 4], 6
push 0
lea edx, [ebp - 0x24]
push edx
push 0x11
lea eax, [ebp - 0x196c]
push eax
push ebx
mov byte [ebp - 0x196c], 0x6f
mov dword [ebp - 0x1968], 0xf
mov dword [ebp - 0x1960], 1
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x412c6d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nError_occurred_while_writing_SH_GET_OPTIONS_to_the_server:__d
call fcn.00554fbd
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x195c]
mov dword [ebp + 8], ecx
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x1904]
call fcn.00401000
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x191c]
call fcn.00401000
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x1934]
call fcn.00401000
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x194c]
call fcn.00401000
mov dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x14], 0
je 0x412e35
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
mov byte [ebp - 0x14], 0
xor al, al
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x10
push edi
push 0
lea eax, [ebp - 0x1c]
push eax
push 0x10
lea ecx, [ebp - 0x196c]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x6d
jne 0x412cad
call esi
push eax
push str.Server_disconnected___d_n
call fcn.00554fbd
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x412dc9
cmp eax, 0xea
je 0x412cbc
test eax, eax
jne 0x412dc9
cmp dword [ebp - 0x1c], 0x10
jb 0x412dc9
cmp byte [ebp - 0x196c], 0x6f
jne 0x412dc9
mov edx, dword [ebp - 0x1960]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x412dc9
mov ecx, dword [ebp - 0x1960]
push 0
lea eax, [ebp - 0x1c]
push eax
push ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setne byte [ebp - 0xd]
call esi
cmp byte [ebp - 0xd], 0
jne 0x412d57
cmp eax, 0xea
je 0x412d57
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x196c]
call fcn.004110a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00411110
jmp 0x412e34
movzx esi, byte [edi]
mov ecx, dword [ebp + 8]
mov edx, esi
shr edx, 1
push edx
lea eax, [edi + 4]
push eax
call fcn.00404e30
movzx eax, byte [esi + edi + 4]
mov dword [ebp + 8], eax
shr eax, 1
add esi, 8
push eax
lea ecx, [esi + edi]
push ecx
mov ecx, dword [ebp + 0xc]
call fcn.00404e30
add esi, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
movzx eax, byte [esi + edi]
mov dword [ebp + 8], eax
shr eax, 1
add esi, 4
push eax
lea edx, [esi + edi]
push edx
call fcn.00404e30
add esi, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
movzx eax, byte [esi + edi]
shr eax, 1
add esi, 4
push eax
add esi, edi
push esi
call fcn.00404e30
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
lea eax, [ebp - 0x195c]
mov dword [ebp + 8], eax
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x1904]
call fcn.00401000
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x191c]
call fcn.00401000
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x1934]
call fcn.00401000
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x194c]
call fcn.00401000
mov dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x14], 0
je 0x412e34
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 0x14], 0
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
xor al, al
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x10