Function at 0x5316c0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x15c
push ebx
mov ebx, dword [esp + 0x168]
push ebp
push esi
test ebx, ebx
push edi
mov ebp, ecx
jne 0x5316f5
push 0x12345678
push str.result__IdentifyKey_error___hUKey__NULL_
call fcn.00532c10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x15c
ret 8
xor eax, eax
lea ecx, [esp + 0x10]
mov dword [esp + 0x11], eax
push ecx
mov dword [esp + 0x19], eax
push ebx
mov dword [ebp + 0x10], 0xff
mov byte [esp + 0x18], 0
mov byte [esp + 0x21], al
call fcn.005b6c50
mov esi, eax
test esi, esi
je 0x531768
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x6d]
mov byte [esp + 0x6c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x10]
stosb byte es:[edi], al
push edx
lea eax, [esp + 0x70]
push str.result_et_GetSN_error__buff_s
push eax
call fcn.00467451
add esp, 0xc
lea ecx, [esp + 0x6c]
push esi
push ecx
mov ecx, ebp
call fcn.00532c10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x15c
ret 8
mov esi, dword [ebp + 0x28]
xor ecx, ecx
mov edx, esi
mov al, byte [esp + ecx + 0x10]
shr al, 4
cmp al, 0xa
movsx eax, al
jge 0x531782
add eax, 0x30
jmp 0x531785
add eax, 0x37
mov byte [edx], al
mov al, byte [esp + ecx + 0x10]
and al, 0xf
cmp al, 0xa
movsx eax, al
jge 0x531799
add eax, 0x30
jmp 0x53179c
add eax, 0x37
mov byte [edx + 1], al
inc ecx
add edx, 2
cmp ecx, 8
jl 0x53176f
xor edx, edx
mov byte [esi + ecx*2], 0
mov dword [esp + 0x1d], edx
lea eax, [esp + 0x1c]
mov dword [esp + 0x21], edx
push eax
mov dword [esp + 0x29], edx
push ebx
mov dword [esp + 0x31], edx
mov ecx, ebp
mov word [esp + 0x35], dx
mov byte [esp + 0x24], 0
mov byte [esp + 0x37], dl
call fcn.005322c0
test eax, eax
mov dword [ebp + 4], eax
je 0x5317fc
push eax
push str.result__IdentifyKey_error_
mov ecx, ebp
call fcn.00532c10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x15c
ret 8
mov edi, dword [ebp + 0x30]
mov ecx, 5
lea esi, [esp + 0x1c]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, 0xe
lea edi, [esp + 0x32]
mov word [esp + 0x30], 0
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x30]
push ecx
push 0x3c
push 0
push ebx
mov ecx, ebp
stosw word es:[edi], ax
call fcn.00531910
test eax, eax
mov dword [ebp + 4], eax
je 0x531869
push 0x12345678
push str.result__ReadHeader_error_
mov ecx, ebp
call fcn.00532c10
push 0x12345678
push str.result__IdentifyKey_error_____ReadHeader_
mov ecx, ebp
call fcn.00532c10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x15c
ret 8
mov edx, dword [ebp + 0x2c]
mov eax, dword [esp + 0x34]
mov esi, 0x23
mov dword [edx], eax
mov ecx, dword [esp + 0x38]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x3c]
mov dword [edx + 8], eax
mov ecx, dword [esp + 0x40]
mov dword [edx + 0xc], ecx
mov al, byte [esp + 0x49]
mov ecx, 1
mov dl, al
cmp esi, ecx
jle 0x5318a6
mov bl, byte [esp + ecx + 0x49]
xor dl, bl
inc ecx
cmp ecx, esi
jl 0x53189b
cmp dl, byte [esp + 0x48]
je 0x5318b5
mov dword [ebp + 0x10], 0xfe
jmp 0x5318c5
mov edx, dword [esp + 0x49]
and edx, 0xff
shr edx, 4
mov dword [ebp + 0x10], edx
mov ecx, dword [esp + 0x4a]
and al, 0xf
and ecx, 0xff
pop edi
mov edx, ecx
pop esi
and edx, 0xf
shr ecx, 4
neg al
sbb eax, eax
mov dword [ebp + 0x14], edx
neg eax
mov dword [ebp + 0x1c], eax
mov eax, dword [esp + 0x43]
mov dword [ebp + 0x18], ecx
mov dword [ebp + 0x20], eax
pop ebp
mov eax, 1
pop ebx
add esp, 0x15c
ret 8