Function at 0x1002f990
Capabilities:
Encode data using xor
Hash data with crc32
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
mov eax, 0x2138
call fcn.1004db20
mov eax, dword [0x100a049c]
xor eax, esp
mov dword [esp + 0x2134], eax
mov eax, dword [ebp + 8]
push esi
push edi
push 0x400
mov dword [esp + 0x30], eax
mov edi, ecx
lea eax, [esp + 0x13c]
mov dword [esp + 0x1c], edi
push 0
push eax
call fcn.10050540
add esp, 0xc
mov dword [esp + 0x60], 0
xorps xmm0, xmm0
lea ecx, [esp + 0x50]
movaps xmmword [esp + 0x50], xmm0
call fcn.1003afa0
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 0xdd
push str.ComConnect::ReadFileFromClient
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x14c]
push str._s_t__d__d___INFO____s:_d__start_Com_ReadFileFromClients_n
push eax
call fcn.10007a40
lea ecx, [esp + 0x154]
add esp, 0x1c
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1002fa30
sub ecx, edx
lea eax, [esp + 0x138]
push ecx
push eax
call fcn.1003b0f0
add esp, 8
cmp dword [edi + 0x80], 0xffffffff
jne 0x1002faf2
push 0x400
lea eax, [esp + 0x13c]
push 0
push eax
call fcn.10050540
add esp, 0xc
mov dword [esp + 0x60], 0
xorps xmm0, xmm0
lea ecx, [esp + 0x50]
movaps xmmword [esp + 0x50], xmm0
call fcn.1003afa0
push 0xdf
push str.ComConnect::ReadFileFromClient
call esi
push eax
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call eax
push eax
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x14c]
push str._s_t__d__d___ERROR____s:_d__ReadFileFromClient_mHandle_INVALID_HANDLE_VALUE_n
push eax
call fcn.10007a40
lea ecx, [esp + 0x154]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1002fac0
lea eax, [esp + 0x138]
sub ecx, edx
push ecx
push eax
call fcn.1003b0f0
add esp, 8
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x2134]
xor ecx, esp
call fcn.1004cbc7
mov esp, ebp
pop ebp
ret 4
xorps xmm0, xmm0
mov dword [esp + 0xa8], 0
movaps xmmword [esp + 0x90], xmm0
xor esi, esi
movq qword [esp + 0xa0], xmm0
mov word [esp + 0xac], 0
mov byte [esp + 0xae], 0
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [edi]
lea ecx, [esp + 0x90]
push 0x1e
push ecx
mov ecx, edi
call dword [eax + 0xc]
lea eax, [esp + 0x90]
push str.00000
push eax
call fcn.1004f7a0
add esp, 8
test eax, eax
jne 0x1002fb73
mov eax, dword [edi]
mov ecx, edi
push str.00SizeErr0
call dword [eax + 4]
inc esi
cmp esi, 0x14
jl 0x1002fb25
xor esi, esi
jmp 0x1002fcaf
push 0xa
lea eax, [esp + 0x94]
mov word [esp + 0x5c], 0
push eax
lea eax, [esp + 0x58]
mov byte [esp + 0x62], 0
xorps xmm0, xmm0
push 0xb
push eax
movq qword [esp + 0x60], xmm0
call fcn.1005d518
lea eax, [esp + 0x60]
push eax
call fcn.1005e4e4
add esp, 0x14
mov dword [esp + 0x40], 0
mov esi, eax
mov byte [esp + 0x44], 0
lea eax, [esp + 0x9a]
mov dword [esp + 0x10], esi
xorps xmm0, xmm0
push 0x14
push eax
lea eax, [esp + 0x38]
movaps xmmword [esp + 0x38], xmm0
push 0x15
push eax
call fcn.1005d518
push 0xa
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x48]
push eax
call fcn.10063d27
add esp, 0x1c
mov dword [esp + 0x20], eax
lea eax, [esp + 0x138]
push 0x400
push 0
push eax
call fcn.10050540
add esp, 0xc
mov dword [esp + 0x80], 0
xorps xmm0, xmm0
lea ecx, [esp + 0x70]
movaps xmmword [esp + 0x70], xmm0
call fcn.1003afa0
push dword [esp + 0x20]
lea eax, [esp + 0x34]
push eax
push esi
lea eax, [esp + 0x9c]
push eax
push 0xd1
push str.ReadDataSize
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call eax
push eax
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0x15c]
push str._s_t__d__d___INFO____s:_d__read_len_is____s__parseInt_is___d__crcStr___s__crc___lu_n
push eax
call fcn.10007a40
lea ecx, [esp + 0x164]
add esp, 0x2c
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1002fc80
sub ecx, edx
lea eax, [esp + 0x138]
push ecx
push eax
call fcn.1003b0f0
mov eax, dword [edi]
add esp, 8
mov ecx, edi
push str.00SizeOk00
call dword [eax + 4]
cmp esi, 1
jge 0x1002fd2e
push 0x400
lea eax, [esp + 0x13c]
push 0
push eax
call fcn.10050540
add esp, 0xc
mov dword [esp + 0x80], 0
xorps xmm0, xmm0
lea ecx, [esp + 0x70]
movaps xmmword [esp + 0x70], xmm0
call fcn.1003afa0
push esi
push 0xe7
push str.ComConnect::ReadFileFromClient
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0x84]
push eax
lea eax, [esp + 0x150]
push str._s_t__d__d___ERROR____s:_d__ReadDataSize___d_n
push eax
call fcn.10007a40
lea ecx, [esp + 0x158]
add esp, 0x20
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1002fd22
jmp 0x1002fac7
push esi
call fcn.1005d45a
add esp, 4
mov dword [esp + 0x14], eax
push esi
push 0
push eax
call fcn.10050540
add esp, 0xc
mov dword [esp + 0x24], 0
nop
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x10094ac0
push str.cncomm
call fcn.1004f7a0
add esp, 8
test eax, eax
je 0x1002fee2
cmp dword [esp + 0x14], 0
je 0x1002fdd0
mov esi, dword [edi + 0x80]
test esi, esi
je 0x1002fdd0
push dword [esp + 0x10]
call fcn.1003fe3d
add esp, 4
mov dword [esp + 0x1c], 0
mov edi, eax
push dword [esp + 0x10]
push 0
push edi
call fcn.10050540
add esp, 0xc
lea eax, [esp + 0x1c]
push 0
push eax
push dword [esp + 0x18]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1002fe64
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [esp + 0x18]
or esi, 0xffffffff
push 0x400
lea eax, [esp + 0x13c]
mov dword [0x100a5098], esi
push 0
push eax
call fcn.10050540
add esp, 0xc
mov dword [esp + 0x80], 0
xorps xmm0, xmm0
lea ecx, [esp + 0x70]
movaps xmmword [esp + 0x70], xmm0
call fcn.1003afa0
push dword [0x100a5098]
push 0xf4
push str.ComConnect::ReadFileFromClient
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0x84]
push eax
lea eax, [esp + 0x150]
push str._s_t__d__d___INFO____s:_d__310_ReadSerialDataLen_with_g_recvSize__d__n
push eax
call fcn.10007a40
lea ecx, [esp + 0x158]
add esp, 0x20
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1002fe51
lea eax, [esp + 0x138]
jmp 0x1003007e
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x1002fed9
mov eax, dword [esp + 0x10]
test edi, edi
je 0x1002fe8f
cmp eax, esi
jb 0x1002fe8f
push esi
push edi
push dword [esp + 0x1c]
call fcn.1004ffc0
mov edi, dword [esp + 0x24]
add esp, 0xc
jmp 0x1002fdd3
push eax
push 0
push dword [esp + 0x1c]
call fcn.10050540
add esp, 0xc
test edi, edi
jne 0x1002febf
call fcn.1005973c
mov dword [eax], 0x16
call fcn.1005d6ea
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
jmp 0x1002fdd3
cmp dword [esp + 0x10], esi
jae 0x1002fed9
call fcn.1005973c
mov dword [eax], 0x22
call fcn.1005d6ea
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
jmp 0x1002fdd3
push str.pcomm
push str.cncomm
call fcn.1004f7a0
add esp, 8
test eax, eax
je 0x1002ff8c
push 0x400
lea eax, [esp + 0x93c]
push 0
push eax
call fcn.10050540
add esp, 0xc
mov dword [esp + 0x60], 0
xorps xmm0, xmm0
lea ecx, [esp + 0x50]
movaps xmmword [esp + 0x50], xmm0
call fcn.1003afa0
push dword [0x100a5098]
push 0xf7
push str.ComConnect::ReadFileFromClient
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0x64]
push eax
lea eax, [esp + 0x950]
push str._s_t__d__d___INFO____s:_d__PComm_sio_FtASCIIRx_with_g_recvSize__d__n
push eax
call fcn.10007a40
lea ecx, [esp + 0x958]
add esp, 0x20
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1002ff70
sub ecx, edx
lea eax, [esp + 0x938]
push ecx
push eax
call fcn.1003b0f0
jmp 0x1003008b
mov ecx, dword [edi + 0x84]
test byte [ecx + 4], 4
je 0x1002ffdb
lea esi, [ecx + 0xdc]
test esi, esi
je 0x1002ffca
lea edi, [esi + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [esp + 0x10]
mov ecx, esi
push dword [esp + 0x18]
call fcn.1002d1d0
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [esp + 0x18]
jmp 0x1002ffe8
push dword [esp + 0x10]
mov ecx, esi
push dword [esp + 0x18]
call fcn.1002d1d0
jmp 0x1002ffe6
push ecx
push esi
push dword [esp + 0x1c]
call fcn.1002caa0
mov esi, eax
push 0x400
lea eax, [esp + 0xd3c]
mov dword [0x100a5098], esi
push 0
push eax
call fcn.10050540
add esp, 0xc
mov dword [esp + 0xc0], 0
xorps xmm0, xmm0
lea ecx, [esp + 0xb0]
movaps xmmword [esp + 0xb0], xmm0
call fcn.1003afa0
push dword [0x100a5098]
push 0xfa
push str.ComConnect::ReadFileFromClient
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0xc4]
push eax
lea eax, [esp + 0xd50]
push str._s_t__d__d___INFO____s:_d__CnComm_g_com__Read_with_g_recvSize__d__n
push eax
call fcn.10007a40
lea ecx, [esp + 0xd58]
add esp, 0x20
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10030070
lea eax, [esp + 0xd38]
sub ecx, edx
push ecx
push eax
call fcn.1003b0f0
mov esi, dword [esp + 0x18]
add esp, 8
cmp dword [0x100a5098], esi
je 0x1003014e
push 0x400
lea eax, [esp + 0x113c]
push 0
push eax
call fcn.10050540
add esp, 0xc
mov dword [esp + 0xe0], 0
xorps xmm0, xmm0
lea ecx, [esp + 0xd0]
movaps xmmword [esp + 0xd0], xmm0
call fcn.1003afa0
push dword [0x100a5098]
push 0xff
push str.ComConnect::ReadFileFromClient
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0xe4]
push eax
lea eax, [esp + 0x1150]
push str._s_t__d__d___ERROR____s:_d__after_read_file_with_size__d_n
push eax
call fcn.10007a40
lea ecx, [esp + 0x1158]
add esp, 0x20
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10030118
sub ecx, edx
lea eax, [esp + 0x1138]
push ecx
push eax
call fcn.1003b0f0
mov eax, dword [edi]
add esp, 8
mov ecx, edi
push str.00DataErr0
call dword [eax + 4]
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10030489
push 0x10094ac0
push str.cncomm
call fcn.1004f7a0
add esp, 8
test eax, eax
jne 0x10030314
push str.pcomm
push str.cncomm
call fcn.1004f7a0
add esp, 8
test eax, eax
je 0x10030314
mov esi, dword [0x100a5098]
push 0x100964cc
push str.getConfigSaved.xml
call fcn.1005e5c9
add esp, 8
mov dword [esp + 0x28], eax
test eax, eax
jne 0x10030241
push 0x400
push eax
lea eax, [esp + 0x1540]
push eax
call fcn.10050540
add esp, 0xc
mov dword [esp + 0x100], 0
xorps xmm0, xmm0
lea ecx, [esp + 0xf0]
movaps xmmword [esp + 0xf0], xmm0
call fcn.1003afa0
push 0x167
push 0x10097338
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0x100]
push eax
lea eax, [esp + 0x154c]
push str._s_t__d__d___ERROR____s:_d__File:_Can_Not_Open_To_Read__n
push eax
call fcn.10007a40
lea ecx, [esp + 0x1554]
add esp, 0x1c
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10030220
sub ecx, edx
lea eax, [esp + 0x1538]
push ecx
push eax
call fcn.1003b0f0
add esp, 8
xor edi, edi
jmp 0x10030318
push esi
call fcn.1005d45a
add esp, 4
mov edi, eax
push esi
push 0
push edi
call fcn.10050540
add esp, 0xc
push dword [esp + 0x28]
push esi
push 1
push edi
call fcn.100657ca
add esp, 0x10
cmp eax, esi
jae 0x10030306
push 0x400
lea eax, [esp + 0x193c]
push 0
push eax
call fcn.10050540
add esp, 0xc
mov dword [esp + 0x120], 0
xorps xmm0, xmm0
lea ecx, [esp + 0x110]
movaps xmmword [esp + 0x110], xmm0
call fcn.1003afa0
push 0x16e
push 0x10097338
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0x120]
push eax
lea eax, [esp + 0x194c]
push str._s_t__d__d___ERROR____s:_d__File:__Read_Failed_n
push eax
call fcn.10007a40
lea ecx, [esp + 0x1954]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100302e8
sub ecx, edx
lea eax, [esp + 0x1938]
push ecx
push eax
call fcn.1003b0f0
add esp, 8
xor edi, edi
jmp 0x10030318
push dword [esp + 0x28]
call fcn.1005e798
add esp, 4
jmp 0x10030318
mov edi, dword [esp + 0x14]
mov edx, dword [0x100a5098]
or esi, 0xffffffff
xor ecx, ecx
test edx, edx
je 0x1003033f
movzx eax, byte [ecx + edi]
inc ecx
xor eax, esi
shr esi, 8
movzx eax, al
xor esi, dword [eax*4 + 0x1008c380]
cmp ecx, edx
jb 0x10030327
push 0x400
lea eax, [esp + 0x1d3c]
not esi
push 0
push eax
call fcn.10050540
add esp, 0xc
mov dword [esp + 0xa0], 0
xorps xmm0, xmm0
lea ecx, [esp + 0x90]
movaps xmmword [esp + 0x90], xmm0
call fcn.1003afa0
push esi
push dword [esp + 0x24]
push 0x110
push str.ComConnect::ReadFileFromClient
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0xa8]
push eax
lea eax, [esp + 0x1d54]
push str._s_t__d__d___INFO____s:_d__sendCrc___lu__recvCrc___lu_n
push eax
call fcn.10007a40
lea ecx, [esp + 0x1d5c]
add esp, 0x24
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100303c0
sub ecx, edx
lea eax, [esp + 0x1d38]
push ecx
push eax
call fcn.1003b0f0
add esp, 8
lea eax, [esp + 0x538]
push 0x400
push 0
push eax
call fcn.10050540
add esp, 0xc
mov dword [esp + 0x40], 0
xorps xmm0, xmm0
lea ecx, [esp + 0x30]
movaps xmmword [esp + 0x30], xmm0
call fcn.1003afa0
cmp esi, dword [esp + 0x20]
je 0x1003051a
push 0x112
push str.ComConnect::ReadFileFromClient
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x54c]
push str._s_t__d__d___ERROR____s:_d__CRC_check_error__retry..._n
push eax
call fcn.10007a40
lea ecx, [esp + 0x554]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10030450
sub ecx, edx
lea eax, [esp + 0x538]
push ecx
push eax
call fcn.1003b0f0
mov edi, dword [esp + 0x20]
add esp, 8
mov ecx, edi
mov eax, dword [edi]
push str.00DataErr0
call dword [eax + 4]
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x24]
inc eax
mov dword [esp + 0x24], eax
cmp eax, 0x14
jl 0x1002fd50
push 0x400
lea eax, [esp + 0x53c]
push 0
push eax
call fcn.10050540
add esp, 0xc
mov dword [esp + 0x40], 0
xorps xmm0, xmm0
lea ecx, [esp + 0x30]
movaps xmmword [esp + 0x30], xmm0
call fcn.1003afa0
push 0x120
push str.ComConnect::ReadFileFromClient
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x54c]
push str._s_t__d__d___ERROR____s:_d__read_file_ERROR___n
push eax
call fcn.10007a40
lea ecx, [esp + 0x554]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10030507
lea eax, [esp + 0x538]
jmp 0x1002face
push 0x119
push str.ComConnect::ReadFileFromClient
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x54c]
push str._s_t__d__d___INFO____s:_d__read_config_data_ok_n
push eax
call fcn.10007a40
lea edx, [esp + 0x554]
add esp, 0x1c
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x10030556
sub edx, ecx
lea eax, [esp + 0x538]
push edx
push eax
call fcn.1003b0f0
mov ecx, dword [esp + 0x20]
add esp, 8
mov eax, dword [ecx]
push str.00DataOk00
call dword [eax + 4]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x213c]
mov dword [eax], edi
mov eax, dword [0x100a5098]
pop edi
pop esi
xor ecx, esp
call fcn.1004cbc7
mov esp, ebp
pop ebp
ret 4