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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x5910aa
push eax
mov eax, 0x196c
mov dword fs:[0], esp
call fcn.00554450
push ebx
push esi
mov esi, ecx
lea eax, [esi + 0x2c]
push edi
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x10], 0
call fcn.00410fa0
mov dword [ebp - 4], 0
mov ecx, esi
call fcn.00410ec0
mov ecx, dword [ebp + 8]
mov ebx, eax
mov eax, dword [ecx + 0x10]
lea eax, [eax + eax + 4]
lea edi, [eax + 0x10]
push edi
push 8
mov byte [ebp - 0x2c], 0x6f
mov dword [ebp - 0x28], 0x10
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x413640
push 0x10
lea edx, [ebp - 0x2c]
push edx
push edi
push esi
call fcn.00554202
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x10]
push 4
lea edx, [ebp - 0x1c]
push edx
lea ecx, [eax + eax]
lea eax, [esi + 0x10]
push edi
push eax
mov dword [ebp - 0x1c], ecx
call fcn.00554202
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x10]
add esp, 0x20
cmp dword [ecx + 0x14], 8
jb 0x4133b8
mov ecx, dword [ecx]
lea edx, [eax + eax]
push edx
push ecx
lea eax, [esi + 0x14]
push edi
push eax
call fcn.00554202
mov edx, dword [ebp - 0x20]
add esp, 0x10
push 0
lea ecx, [ebp - 0x30]
push ecx
add edx, 0x10
push edx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
push 0
test eax, eax
jne 0x413428
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nError_occurred_while_writing_SH_GET_REGISTRATION_to_the_server:__d
call fcn.00554fbd
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x10], 0
je 0x413662
mov eax, dword [ebp - 0x14]
push eax
jmp 0x413658
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
lea ecx, [ebp - 0x1968]
mov dword [ebp + 8], ecx
lea ecx, [ebp - 0x1958]
call fcn.0043f590
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1940]
call fcn.0043f590
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1928]
call fcn.0043f590
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x1910]
call fcn.0043f590
mov byte [ebp - 4], 6
push 0
lea edx, [ebp - 0x18]
push edx
push 0x10
lea eax, [ebp - 0x1978]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x6d
jne 0x4134e6
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]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1978]
call fcn.004110a0
mov dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x10], 0
je 0x413662
mov ecx, dword [ebp - 0x14]
push ecx
jmp 0x413658
cmp eax, 0xea
je 0x4134f1
test eax, eax
jne 0x4134b6
cmp dword [ebp - 0x18], 0x10
jb 0x4134b6
cmp byte [ebp - 0x1978], 0x6f
jne 0x4134b6
mov ecx, dword [ebp - 0x196c]
push ecx
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x4134b6
mov eax, dword [ebp - 0x196c]
push 0
lea edx, [ebp - 0x18]
push edx
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setne byte [ebp + 0xb]
call esi
cmp byte [ebp + 0xb], 0
jne 0x41357c
cmp eax, 0xea
je 0x41357c
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 - 0x1978]
call fcn.004110a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00411110
jmp 0x413662
movzx esi, byte [edi]
mov ecx, esi
shr ecx, 1
push ecx
mov ecx, dword [ebp + 0xc]
lea edx, [edi + 4]
push edx
call fcn.00404e30
movzx eax, byte [esi + edi + 4]
mov ecx, dword [ebp + 0x10]
mov dword [ebp + 8], eax
shr eax, 1
push eax
add esi, 8
lea eax, [esi + edi]
push eax
call fcn.00404e30
add esi, dword [ebp + 8]
movzx eax, byte [esi + edi]
mov dword [ebp + 8], eax
shr eax, 1
add esi, 4
push eax
lea ecx, [esi + edi]
push ecx
mov ecx, dword [ebp + 0x14]
call fcn.00404e30
add esi, dword [ebp + 8]
mov ecx, dword [ebp + 0x18]
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 + 0x1c]
mov eax, dword [esi + edi]
mov dword [ecx], eax
mov edx, dword [esi + edi + 4]
mov eax, dword [ebp + 0x20]
push edi
push 0
mov dword [eax], edx
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 ecx, [ebp - 0x1978]
call fcn.004110a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00411110
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x1c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x10], 0
je 0x413662
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 0x10], 0
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 0x1c