Function at 0x40d302
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x427b4c
call fcn.00427220
sub esp, 0x20
push ebx
push esi
mov esi, ecx
push edi
mov eax, dword [esi]
call dword [eax + 0x24]
mov edi, eax
push edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebx, ebx
cmp byte [esi + 0x41e], bl
mov dword [ebp - 4], ebx
je 0x40d576
cmp byte [esi + 0x40c], bl
jne 0x40d56f
cmp byte [esi + 0x41d], bl
jne 0x40d56f
lea edi, [esi + 0x410]
push ebx
push edi
push 0x2000
push dword [esi + 0x2a0]
push dword [esi + 0x408]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
jne 0x40d434
cmp dword [edi], ebx
je 0x40d383
mov byte [esi + 0x41d], 1
mov ecx, dword [esi + 0x420]
mov dword [ebp - 0x14], ebx
cmp ecx, ebx
je 0x40d448
mov eax, dword [esi + 0x424]
cmp eax, dword [esi + 0x428]
jge 0x40d448
add eax, ecx
push 4
push eax
lea eax, [ebp - 0x14]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
cmp dword [ebp - 0x14], ebx
je 0x40d448
add dword [esi + 0x424], 4
push ebx
push ebx
push ebx
call fcn.0042274c
push dword [edi]
push dword [esi + 0x2a0]
push eax
call fcn.0042274c
add esp, 0x18
cmp eax, dword [ebp - 0x14]
jne 0x40d448
mov eax, dword [edi]
push 7
mov ecx, eax
mov edx, eax
and ecx, 0xff0000
push 0xc
shr edx, 0x10
or ecx, edx
mov edx, eax
shl edx, 0x10
and eax, 0xff00
mov byte [ebp - 0x2c], 7
or edx, eax
lea eax, [ebp - 0x2c]
shr ecx, 8
shl edx, 8
or ecx, edx
push eax
mov dword [ebp - 0x24], ecx
mov ecx, dword [esi + 0xc8]
mov byte [ebp - 0x2b], 5
mov dword [ebp - 0x28], 0x2000000
call fcn.0041e5d4
jmp 0x40d552
cmp dword [edi], ebx
jne 0x40d383
mov byte [esi + 0x40c], 1
jmp 0x40d55a
cmp byte [esi + 0x41c], bl
mov ecx, 0x2400
mov dword [ebp - 0x18], ecx
mov byte [ebp - 0xd], bl
je 0x40d4a8
push dword [edi]
lea eax, [ebp - 0x18]
push dword [esi + 0x2a0]
push eax
push dword [esi + 0x2a4]
call fcn.00422731
add esp, 0x10
cmp eax, ebx
je 0x40d4a1
push eax
push str.C:cppSCZ_SCwinvncwinvnc_vncclient.cpp_:_Compress_returned_error_in_File_Send_:_d_n
push 9
push 0x4386e8
call fcn.00405446
add esp, 0x10
mov ecx, esi
mov byte [esi + 0x41d], 1
call fcn.0040d58c
jmp 0x40d56a
mov ecx, dword [ebp - 0x18]
mov byte [ebp - 0xd], 1
mov eax, dword [edi]
cmp ecx, eax
jbe 0x40d4b1
mov byte [ebp - 0xd], bl
mov dl, byte [ebp - 0xd]
mov byte [ebp - 0x2c], 7
neg dl
sbb edx, edx
mov byte [ebp - 0x2b], 5
and edx, 0x1000000
cmp byte [ebp - 0xd], bl
mov dword [ebp - 0x28], edx
je 0x40d4f6
mov eax, ecx
mov edx, ecx
and eax, 0xff0000
shr edx, 0x10
or eax, edx
mov edx, ecx
and edx, 0xff00
shl ecx, 0x10
or edx, ecx
shr eax, 8
shl edx, 8
or eax, edx
mov dword [ebp - 0x24], eax
jmp 0x40d51c
mov ecx, eax
mov edx, eax
and ecx, 0xff0000
shr edx, 0x10
or ecx, edx
mov edx, eax
shl edx, 0x10
and eax, 0xff00
or edx, eax
shr ecx, 8
shl edx, 8
or ecx, edx
mov dword [ebp - 0x24], ecx
mov ecx, dword [esi + 0xc8]
push 7
lea eax, [ebp - 0x2c]
push 0xc
push eax
call fcn.0041e5d4
cmp byte [ebp - 0xd], bl
je 0x40d53f
push dword [ebp - 0x18]
push dword [esi + 0x2a4]
jmp 0x40d547
push dword [edi]
push dword [esi + 0x2a0]
mov ecx, dword [esi + 0xc8]
call fcn.0041e60f
mov eax, dword [edi]
add dword [esi + 0x414], eax
push ebx
push esi
push dword [0x438c28]
call fcn.0041d585
add esp, 0xc
push dword [ebp - 0x1c]
jmp 0x40d577
mov ecx, esi
call fcn.0040d58c
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret