Function at 0x581c20
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xf0
mov eax, dword [0x5eef00]
xor eax, esp
mov dword [esp + 0xec], eax
push esi
mov esi, ecx
test esi, esi
jne 0x581c54
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0xec]
xor ecx, esp
call fcn.004b2f95
add esp, 0xf0
ret
push ebx
push ebp
lea eax, [esi + 0xd10]
or ebp, 0xffffffff
test eax, eax
lea ecx, [esi + 0xd60]
push edi
mov dword [esp + 0x1c], ecx
lea ebx, [esi + 0xd30]
lea edi, [esi + 0xcf0]
mov dword [esp + 0x20], ebp
je 0x582161
test edi, edi
je 0x582161
test ebx, ebx
je 0x582161
test ecx, ecx
je 0x582161
mov edx, dword [0x5bc580]
mov ecx, dword [str.master_secret]
push 0x20
push eax
mov dword [esp + 0xb4], ecx
mov ecx, dword [0x5bc584]
mov dword [esp + 0xb8], edx
mov dl, byte [0x5bc588]
lea eax, [esp + 0xc1]
push eax
mov dword [esp + 0xc0], ecx
mov byte [esp + 0xc4], dl
call fcn.004b42c0
push 0x20
lea ecx, [esp + 0xe9]
push edi
push ecx
call fcn.004b42c0
add esp, 0x18
cmp word [esi + 0x1054], 0x303
jb 0x581e69
lea edx, [esp + 0xac]
test edx, edx
je 0x582161
push 0x20
lea eax, [esp + 0x4c]
push eax
push 0x30
push ebx
mov ecx, edx
push 0x4d
push ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], ebp
call fcn.004cbed0
add esp, 0x18
test eax, eax
jne 0x582161
push 0x6d
call fcn.004772c0
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x582161
mov edi, edi
push 0x4d
lea edx, [esp + 0xb0]
push edx
lea eax, [ebp + 0x20]
mov ecx, 8
lea esi, [esp + 0x50]
mov edi, ebp
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.004b42c0
push 0x20
lea eax, [esp + 0x9c]
push eax
push 0x30
push ebx
push 0x6d
push ebp
call fcn.004cbed0
add esp, 0x24
test eax, eax
jne 0x581e4b
push 0x20
lea ecx, [esp + 0x4c]
push ecx
push 0x30
push ebx
mov edx, ecx
push 0x20
push edx
call fcn.004cbed0
add esp, 0x18
test eax, eax
jne 0x581e4b
mov esi, dword [esp + 0x10]
mov eax, 0x30
sub eax, esi
cmp eax, 0x20
jbe 0x581dc4
mov eax, 0x20
mov ecx, dword [esp + 0x1c]
push eax
lea eax, [esp + 0x90]
push eax
lea edx, [esi + ecx]
push edx
call fcn.004b42c0
add esi, 0x20
add esp, 0xc
cmp esi, 0x30
mov dword [esp + 0x10], esi
jb 0x581d50
xor eax, eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
xor esi, esi
jmp 0x581e4f
mov esi, dword [esp + 0x14]
push 0x6d
push 0
push ebp
call fcn.004b3a80
push ebp
call fcn.00477540
add esp, 0x10
test esi, esi
jmp 0x582157
lea eax, [esp + 0xac]
test eax, eax
mov dword [esp + 0x14], ebp
je 0x582161
push 0x30
call fcn.004772c0
add esp, 4
test eax, eax
mov dword [esp + 0x10], eax
je 0x582161
push 0x10
lea ecx, [esp + 0x28]
push ecx
push 0x18
push ebx
lea edx, [esp + 0xbc]
push 0x4d
push edx
xor edi, edi
mov dword [esp + 0x30], ebp
call fcn.004cbb40
add esp, 0x18
test eax, eax
jne 0x58213b
push 0x5d
call fcn.004772c0
mov esi, eax
add esp, 4
test esi, esi
je 0x58213b
lea ebp, [esi + 0x10]
mov eax, dword [esp + 0x24]
mov dword [esi], eax
mov ecx, dword [esp + 0x28]
mov dword [esi + 4], ecx
mov edx, dword [esp + 0x2c]
push 0x4d
lea ecx, [esp + 0xb0]
mov dword [esi + 8], edx
mov eax, dword [esp + 0x34]
push ecx
push ebp
mov dword [esi + 0xc], eax
call fcn.004b42c0
push 0x10
lea edx, [esp + 0x78]
push edx
push 0x18
push ebx
push 0x5d
push esi
call fcn.004cbb40
add esp, 0x24
test eax, eax
jne 0x581f8b
push 0x10
lea eax, [esp + 0x28]
push eax
push 0x18
push ebx
mov ecx, eax
push 0x10
push ecx
call fcn.004cbb40
add esp, 0x18
test eax, eax
jne 0x581f8b
mov eax, 0x30
sub eax, edi
cmp eax, 0x10
jbe 0x581f43
mov eax, 0x10
push eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x6c]
push edx
lea ecx, [edi + eax]
push ecx
call fcn.004b42c0
add edi, 0x10
add esp, 0xc
cmp edi, 0x30
jb 0x581ed3
xor eax, eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
xor edi, edi
jmp 0x581f8f
mov edi, dword [esp + 0x18]
push 0x5d
push 0
push esi
call fcn.004b3a80
push esi
call fcn.00477540
add esp, 0x10
test edi, edi
jne 0x58213b
add ebx, 0x18
test ebx, ebx
mov dword [esp + 0x18], 0xffffffff
je 0x58213b
push 0x14
lea edx, [esp + 0x38]
push edx
push 0x18
push ebx
lea eax, [esp + 0xbc]
push 0x4d
push eax
call fcn.004cbd00
add esp, 0x18
test eax, eax
jne 0x58213b
push 0x61
call fcn.004772c0
mov esi, eax
add esp, 4
test esi, esi
je 0x58213b
lea ebp, [esi + 0x14]
jmp 0x582000
mov ecx, dword [esp + 0x34]
mov dword [esi], ecx
mov edx, dword [esp + 0x38]
mov dword [esi + 4], edx
mov eax, dword [esp + 0x3c]
mov dword [esi + 8], eax
mov ecx, dword [esp + 0x40]
push 0x4d
lea eax, [esp + 0xb0]
mov dword [esi + 0xc], ecx
mov edx, dword [esp + 0x48]
push eax
push ebp
mov dword [esi + 0x10], edx
call fcn.004b42c0
push 0x14
lea ecx, [esp + 0x88]
push ecx
push 0x18
push ebx
push 0x61
push esi
call fcn.004cbd00
add esp, 0x24
test eax, eax
jne 0x5820d7
push 0x14
lea edx, [esp + 0x38]
push edx
push 0x18
push ebx
mov eax, edx
push 0x14
push eax
call fcn.004cbd00
add esp, 0x18
test eax, eax
jne 0x5820d7
mov eax, 0x30
sub eax, edi
cmp eax, 0x14
jbe 0x58207e
mov eax, 0x14
mov edx, dword [esp + 0x10]
push eax
lea ecx, [esp + 0x7c]
push ecx
lea eax, [edi + edx]
push eax
call fcn.004b42c0
add edi, 0x14
add esp, 0xc
cmp edi, 0x30
jb 0x582000
xor eax, eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
xor edi, edi
jmp 0x5820db
mov edi, dword [esp + 0x18]
push 0x61
push 0
push esi
call fcn.004b3a80
push esi
call fcn.00477540
add esp, 0x10
test edi, edi
jne 0x58213b
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
lea ecx, [esi + 2]
sub esi, eax
mov edi, 8
movzx edx, byte [esi + eax]
xor byte [eax], dl
movzx edx, byte [ecx - 1]
xor byte [eax + 1], dl
movzx edx, byte [ecx]
xor byte [eax + 2], dl
movzx edx, byte [ecx + 1]
xor byte [eax + 3], dl
movzx edx, byte [ecx + 2]
xor byte [eax + 4], dl
movzx edx, byte [ecx + 3]
xor byte [eax + 5], dl
add eax, 6
add ecx, 6
sub edi, 1
jne 0x582104
mov dword [esp + 0x14], edi
mov esi, dword [esp + 0x10]
push 0x30
push 0
push esi
call fcn.004b3a80
push esi
call fcn.00477540
add esp, 0x10
cmp dword [esp + 0x14], 0
jne 0x582161
mov dword [esp + 0x20], 0
mov ecx, dword [esp + 0xfc]
mov eax, dword [esp + 0x20]
pop edi
pop ebp
pop ebx
pop esi
xor ecx, esp
call fcn.004b2f95
add esp, 0xf0
ret