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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x90
mov esi, esp
mov ebx, dword [ebp + 0x14]
push ebx
call fcn.005896f0
add esp, 4
test eax, eax
je 0x5866d9
mov edi, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebx + 4]
cmp edx, 0x200000
jl 0x58670a
push edi
push eax
push ebx
push ecx
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00585d00
jmp 0x587097
call fcn.005b5b10
push str.BN_mod_exp_mont_consttime
push 0x277
push str.crypto_bn_bn_exp.c
call fcn.005b5c10
add esp, 0xc
push 0
push 0x66
push 3
call fcn.005b5d00
add esp, 0xc
xor eax, eax
jmp 0x587097
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x5867fd
mov dword [esi + 0x38], ecx
mov dword [esi + 0x2c], edx
push eax
call fcn.00584bf0
add esp, 4
test edi, edi
je 0x586821
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0xc], 0
mov dword [esi + 0x14], edi
jne 0x586749
push ebx
push eax
call fcn.00588f80
mov ecx, dword [ebp + 0xc]
add esp, 8
test eax, eax
js 0x58677a
mov edi, dword [ebp + 0x18]
push edi
call fcn.00584da0
add esp, 4
test eax, eax
je 0x58685c
push edi
push ebx
push dword [ebp + 0xc]
push eax
mov edi, eax
call fcn.00589890
add esp, 0x10
mov ecx, edi
test eax, eax
mov edi, dword [esi + 0x14]
je 0x586959
mov dword [esi + 8], ecx
mov ecx, 6
mov edx, dword [esi + 0x38]
cmp edx, 0x1d
jg 0x5867ac
mov ecx, 5
cmp edx, 9
jg 0x5867ac
mov ecx, 4
cmp edx, 2
jg 0x5867ac
xor eax, eax
test edx, edx
setg al
lea ecx, [eax*2 + 1]
mov edi, 1
shl edi, cl
mov edx, dword [esi + 0x2c]
mov eax, edx
mov dword [esi + 0x40], ecx
shl eax, cl
lea ecx, [edx + edx]
cmp ecx, edi
cmovle ecx, edi
add ecx, eax
lea edx, [ecx*4]
lea eax, [ecx*4 + 0x40]
mov dword [esi + 0x30], edx
cmp edx, 0xbff
jg 0x586887
add eax, 3
and eax, 0xfffffffc
call fcn.00787ee0
mov ecx, esp
and ecx, 0xfffffff0
mov esp, ecx
xor eax, eax
jmp 0x5868a4
push 1
push ebx
call fcn.00589600
add esp, 8
test eax, eax
je 0x586878
push dword [ebp + 8]
call fcn.005895e0
add esp, 4
mov eax, 1
jmp 0x587097
call fcn.0058a860
test eax, eax
je 0x586973
mov edi, eax
push dword [ebp + 0x18]
push ebx
push eax
call fcn.0058a960
add esp, 0xc
test eax, eax
jne 0x58672c
xor ecx, ecx
xor ebx, ebx
mov dword [esi + 0x44], 0
mov dword [esi + 0x24], 0
jmp 0x587055
mov dword [esi + 0x24], 0
xor ebx, ebx
xor ecx, ecx
mov eax, edi
mov dword [esi + 0x44], 0
mov edi, dword [esi + 0x14]
jmp 0x58704f
push 1
push dword [ebp + 8]
call fcn.005887b0
jmp 0x587097
push 0x2e9
push str.crypto_bn_bn_exp.c
push eax
call fcn.005db3a0
add esp, 0xc
mov ecx, eax
test eax, eax
je 0x586bcf
mov dword [esi + 0x28], edi
mov dword [esi + 0x44], eax
mov edx, ecx
and edx, 0x3f
mov eax, 0x40
mov dword [esi + 0x10], edx
sub eax, edx
mov dword [esi + 0x64], eax
mov dword [esi + 0x18], ecx
add eax, ecx
mov dword [esi + 0x1c], eax
push dword [esi + 0x30]
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov edi, dword [esi + 0x2c]
lea edx, [edi*4]
mov ecx, dword [esi + 0x40]
shl edx, cl
mov eax, dword [esi + 0x1c]
lea ecx, [eax + edx]
lea eax, [ecx + edi*4]
mov dword [esi + 0x68], eax
mov dword [esi + 0x50], ecx
mov dword [esi + 0x6c], 0
mov dword [esi + 0x54], 0
mov dword [esi + 0x70], edi
mov dword [esi + 0x58], edi
mov dword [esi + 0x74], 0
mov dword [esi + 0x5c], 0
mov dword [esi + 0x78], 2
mov dword [esi + 0x60], 2
mov eax, dword [ebx]
cmp dword [eax + edi*4 - 4], 0
js 0x58698c
call fcn.00588100
lea ecx, [esi + 0x50]
mov ebx, dword [ebp + 0x18]
push ebx
mov edi, dword [esi + 0x14]
push edi
push eax
push ecx
call fcn.0058a840
add esp, 0x10
test eax, eax
jne 0x586a88
mov dword [esi + 0x24], 0
mov eax, ebx
jmp 0x587049
mov dword [esi + 0x24], 0
mov dword [esi + 0x44], 0
xor ebx, ebx
xor ecx, ecx
mov eax, dword [ebp + 0x18]
jmp 0x58704f
xor ecx, ecx
xor ebx, ebx
mov dword [esi + 0x44], 0
xor edi, edi
mov dword [esi + 0x24], 0
jmp 0x587055
mov dword [esi + 0x20], edx
xor edx, edx
sub edx, dword [eax]
mov dword [esi + 0x34], ecx
mov dword [ecx], edx
cmp edi, 2
jl 0x586a7f
mov dword [esi + 0xc], 1
cmp edi, 0xd
jb 0x586a16
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0x20]
add edx, ecx
mov ecx, dword [esi + 0x10]
sub edx, ecx
sub edx, eax
add edx, 0x40
cmp edx, 0x20
mov edi, dword [esi + 0x2c]
jb 0x586a16
dec edi
mov ebx, edi
and ebx, 0xfffffff8
lea ecx, [ebx + 1]
mov dword [esi + 0xc], ecx
mov edx, dword [esi + 0x20]
sub edx, dword [esi + 0x10]
mov ecx, dword [esi + 0x18]
add edx, ecx
add edx, 0x54
mov ecx, ebx
pcmpeqd xmm0, xmm0
xor ebx, ebx
movdqu xmm1, xmmword [eax + ebx*4 + 4]
movdqu xmm2, xmmword [eax + ebx*4 + 0x14]
pxor xmm1, xmm0
pxor xmm2, xmm0
movdqu xmmword [edx + ebx*4 - 0x10], xmm1
movdqu xmmword [edx + ebx*4], xmm2
add ebx, 8
cmp ecx, ebx
jne 0x5869e9
cmp edi, ecx
mov edi, dword [esi + 0x2c]
je 0x586a7f
mov edx, edi
mov ebx, dword [esi + 0xc]
sub edx, ebx
and edx, 3
mov edi, dword [esi + 0x34]
je 0x586a34
mov ebx, dword [esi + 0xc]
mov ecx, dword [eax + ebx*4]
not ecx
mov dword [edi + ebx*4], ecx
inc ebx
dec edx
jne 0x586a28
mov edi, dword [esi + 0x2c]
mov ecx, dword [esi + 0xc]
sub ecx, edi
cmp ecx, 0xfffffffc
ja 0x586a7f
mov edx, dword [esi + 0x20]
sub edx, dword [esi + 0x10]
mov ecx, dword [esi + 0x18]
add ecx, edx
add ecx, 0x4c
mov edi, dword [esi + 0x2c]
mov edx, dword [eax + ebx*4]
not edx
mov dword [ecx + ebx*4 - 0xc], edx
mov edx, dword [eax + ebx*4 + 4]
not edx
mov dword [ecx + ebx*4 - 8], edx
mov edx, dword [eax + ebx*4 + 8]
not edx
mov dword [ecx + ebx*4 - 4], edx
mov edx, dword [eax + ebx*4 + 0xc]
not edx
mov dword [ecx + ebx*4], edx
add ebx, 4
cmp edi, ebx
jne 0x586a52
mov dword [esi + 0x54], edi
mov ebx, dword [ebp + 0x18]
mov edi, dword [esi + 0x14]
lea eax, [esi + 0x68]
push ebx
push edi
push dword [esi + 8]
push eax
call fcn.0058a840
add esp, 0x10
mov dword [esi + 0x24], 0
test eax, eax
je 0x586f26
mov ecx, dword [esi + 0x54]
mov eax, dword [esi + 0x2c]
cmp ecx, eax
cmovge ecx, eax
mov dword [esi + 0xc], ecx
test ecx, ecx
jle 0x586b9d
mov edx, dword [esi + 0x50]
mov ecx, dword [esi + 0xc]
mov eax, ecx
and eax, 3
mov dword [esi + 8], eax
xor edi, edi
mov eax, 0
cmp ecx, 4
jb 0x586b61
and dword [esi + 0xc], 0x7ffffffc
mov ecx, dword [esi + 0x28]
lea eax, [ecx*4]
lea edi, [eax + eax*2]
sub edi, dword [esi + 0x10]
mov ebx, dword [esi + 0x18]
add edi, ebx
add edi, 0x40
mov dword [esi + 0x20], edi
lea edi, [ecx*8]
sub edi, dword [esi + 0x10]
lea ecx, [edi + ebx]
add ecx, 0x40
mov dword [esi + 0x34], ecx
sub eax, dword [esi + 0x10]
add eax, ebx
add eax, 0x40
mov dword [esi + 0x3c], eax
xor edi, edi
xor ebx, ebx
mov eax, dword [edx + edi*4]
mov ecx, edx
mov edx, dword [esi + 0x1c]
mov dword [edx + ebx*4], eax
mov edx, ecx
mov eax, dword [ecx + edi*4 + 4]
mov ecx, dword [esi + 0x3c]
mov dword [ecx + ebx*4], eax
mov eax, dword [edx + edi*4 + 8]
mov ecx, dword [esi + 0x34]
mov dword [ecx + ebx*4], eax
mov eax, dword [edx + edi*4 + 0xc]
mov ecx, dword [esi + 0x20]
mov dword [ecx + ebx*4], eax
mov ecx, dword [esi + 0x28]
lea eax, [ebx + ecx]
add eax, ecx
add eax, ecx
add edi, 4
add eax, ecx
mov ebx, eax
cmp dword [esi + 0xc], edi
jne 0x586b20
cmp dword [esi + 8], 0
je 0x586b9d
lea ecx, [edx + edi*4]
shl eax, 2
sub eax, dword [esi + 0x10]
mov edx, dword [esi + 0x18]
add eax, edx
add eax, 0x40
mov edx, dword [esi + 0x28]
lea edx, [edx*4]
xor edi, edi
nop word cs:[eax + eax]
mov ebx, dword [ecx + edi*4]
mov dword [eax], ebx
inc edi
add eax, edx
cmp dword [esi + 8], edi
jne 0x586b90
mov ecx, dword [esi + 0x6c]
mov eax, dword [esi + 0x2c]
cmp ecx, eax
cmovge ecx, eax
mov dword [esi + 8], ecx
test ecx, ecx
jle 0x586cc3
mov ecx, dword [esi + 0x68]
mov eax, dword [esi + 8]
mov ebx, eax
and ebx, 3
cmp eax, 4
jae 0x586bed
mov edi, 1
xor eax, eax
jmp 0x586c86
mov dword [esi + 0x24], 0
mov dword [esi + 0x44], 0
xor ecx, ecx
mov eax, dword [ebp + 0x18]
mov ebx, dword [esi + 0x30]
mov edi, dword [esi + 0x14]
jmp 0x58704f
mov dword [esi + 0x4c], ebx
and dword [esi + 8], 0x7ffffffc
mov eax, dword [esi + 0x28]
lea edx, [eax*4]
lea eax, [edx + edx*2]
mov edi, dword [esi + 0x10]
sub eax, edi
mov ebx, dword [esi + 0x18]
add eax, ebx
add eax, 0x44
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x28]
lea eax, [eax*8]
sub eax, edi
add eax, ebx
add eax, 0x44
mov dword [esi + 0x34], eax
mov dword [esi + 0xc], edx
sub edx, edi
lea eax, [edx + ebx]
add eax, 0x44
mov dword [esi + 0x3c], eax
sub ebx, edi
add ebx, 0x44
mov dword [esi + 0x48], ebx
xor edi, edi
xor eax, eax
nop word cs:[eax + eax]
mov edx, dword [ecx + eax*4]
mov ebx, dword [esi + 0x48]
mov dword [ebx + edi*4], edx
mov edx, dword [ecx + eax*4 + 4]
mov ebx, dword [esi + 0x3c]
mov dword [ebx + edi*4], edx
mov edx, dword [ecx + eax*4 + 8]
mov ebx, dword [esi + 0x34]
mov dword [ebx + edi*4], edx
mov edx, dword [ecx + eax*4 + 0xc]
mov ebx, dword [esi + 0x20]
mov dword [ebx + edi*4], edx
add eax, 4
add edi, dword [esi + 0xc]
cmp dword [esi + 8], eax
jne 0x586c50
inc edi
mov ebx, dword [esi + 0x4c]
test ebx, ebx
je 0x586cc3
lea eax, [ecx + eax*4]
mov dword [esi + 8], eax
shl edi, 2
sub edi, dword [esi + 0x10]
mov ecx, dword [esi + 0x18]
add ecx, edi
add ecx, 0x40
mov edx, dword [esi + 0x28]
lea edx, [edx*4]
xor edi, edi
nop word [eax + eax]
mov eax, ebx
mov ebx, dword [esi + 8]
mov ebx, dword [ebx + edi*4]
mov dword [ecx], ebx
mov ebx, eax
inc edi
add ecx, edx
cmp eax, edi
jne 0x586cb0
cmp dword [esi + 0x40], 2
jb 0x586f2e
lea ecx, [esi + 0x50]
push dword [ebp + 0x18]
mov edi, dword [esi + 0x14]
push edi
lea eax, [esi + 0x68]
push eax
push eax
push ecx
call fcn.0058a340
add esp, 0x14
test eax, eax
je 0x586f26
mov ecx, dword [esi + 0x54]
mov eax, dword [esi + 0x2c]
cmp ecx, eax
cmovge ecx, eax
mov dword [esi + 8], ecx
test ecx, ecx
jle 0x586de3
mov ecx, dword [esi + 0x50]
mov eax, dword [esi + 8]
mov ebx, eax
and ebx, 3
cmp eax, 4
jae 0x586d1f
mov edi, 2
xor eax, eax
jmp 0x586dac
mov dword [esi + 0x24], ebx
and dword [esi + 8], 0x7ffffffc
mov eax, dword [esi + 0x28]
lea edx, [eax*4]
lea eax, [edx + edx*2]
mov edi, dword [esi + 0x10]
sub eax, edi
mov ebx, dword [esi + 0x18]
add eax, ebx
add eax, 0x48
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x28]
lea eax, [eax*8]
sub eax, edi
add eax, ebx
add eax, 0x48
mov dword [esi + 0x34], eax
mov dword [esi + 0xc], edx
sub edx, edi
lea eax, [edx + ebx]
add eax, 0x48
mov dword [esi + 0x3c], eax
sub ebx, edi
add ebx, 0x48
mov dword [esi + 0x48], ebx
xor edi, edi
xor eax, eax
mov edx, dword [ecx + eax*4]
mov ebx, dword [esi + 0x48]
mov dword [ebx + edi*4], edx
mov edx, dword [ecx + eax*4 + 4]
mov ebx, dword [esi + 0x3c]
mov dword [ebx + edi*4], edx
mov edx, dword [ecx + eax*4 + 8]
mov ebx, dword [esi + 0x34]
mov dword [ebx + edi*4], edx
mov edx, dword [ecx + eax*4 + 0xc]
mov ebx, dword [esi + 0x20]
mov dword [ebx + edi*4], edx
add eax, 4
add edi, dword [esi + 0xc]
cmp dword [esi + 8], eax
jne 0x586d74
add edi, 2
mov ebx, dword [esi + 0x24]
test ebx, ebx
je 0x586de3
lea eax, [ecx + eax*4]
mov dword [esi + 8], eax
shl edi, 2
sub edi, dword [esi + 0x10]
mov ecx, dword [esi + 0x18]
add ecx, edi
add ecx, 0x40
mov edx, dword [esi + 0x28]
lea edx, [edx*4]
xor edi, edi
mov eax, ebx
mov ebx, dword [esi + 8]
mov ebx, dword [ebx + edi*4]
mov dword [ecx], ebx
mov ebx, eax
inc edi
add ecx, edx
cmp eax, edi
jne 0x586dd0
mov ecx, dword [esi + 0x28]
cmp ecx, 5
mov eax, 4
cmovae eax, ecx
mov dword [esi + 0x4c], eax
lea edx, [ecx*4]
lea eax, [edx + edx*2]
mov ebx, dword [esi + 0x10]
sub eax, ebx
mov dword [esi + 0xc], eax
lea ecx, [ecx*8]
sub ecx, ebx
mov dword [esi + 8], edx
sub edx, ebx
mov eax, dword [esi + 0x18]
mov edi, eax
sub edi, ebx
mov ebx, edi
mov edi, dword [esi + 0xc]
add edi, eax
add edi, 0x4c
mov dword [esi + 0x34], edi
lea ecx, [ecx + eax + 0x4c]
mov dword [esi + 0x3c], ecx
lea ecx, [edx + eax]
add ecx, 0x4c
mov dword [esi + 0x48], ecx
add dword [esi + 0x64], eax
add ebx, 0x4c
mov dword [esi + 0x10], 3
mov dword [esi + 0x24], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x20], ebx
jmp 0x586e6b
mov eax, dword [esi + 0x10]
inc eax
inc dword [esi + 0x18]
mov dword [esi + 0x10], eax
cmp eax, dword [esi + 0x4c]
je 0x586f2e
push dword [ebp + 0x18]
mov edi, dword [esi + 0x14]
push edi
lea ecx, [esi + 0x50]
push ecx
lea eax, [esi + 0x68]
push eax
push ecx
call fcn.0058a340
add esp, 0x14
test eax, eax
je 0x586f26
mov edi, dword [esi + 0x54]
mov eax, dword [esi + 0x2c]
cmp edi, eax
cmovge edi, eax
test edi, edi
jle 0x586e58
mov ecx, dword [esi + 0x50]
xor edx, edx
mov ebx, dword [esi + 0x10]
cmp edi, 4
jb 0x586ef8
mov dword [esi + 0x7c], edi
and edi, 0x7ffffffc
mov dword [esi + 0xc], edi
xor edx, edx
mov ebx, dword [esi + 0x18]
nop dword [eax + eax]
mov edi, dword [ecx + edx*4]
mov eax, dword [esi + 0x20]
mov dword [eax + ebx*4], edi
mov edi, dword [ecx + edx*4 + 4]
mov eax, dword [esi + 0x48]
mov dword [eax + ebx*4], edi
mov edi, dword [ecx + edx*4 + 8]
mov eax, dword [esi + 0x3c]
mov dword [eax + ebx*4], edi
mov edi, dword [ecx + edx*4 + 0xc]
mov eax, dword [esi + 0x34]
mov dword [eax + ebx*4], edi
add edx, 4
add ebx, dword [esi + 8]
cmp dword [esi + 0xc], edx
jne 0x586ec0
add ebx, 3
mov edi, dword [esi + 0x7c]
and edi, 3
je 0x586e58
lea eax, [ecx + edx*4]
mov ecx, dword [esi + 0x64]
lea ecx, [ecx + ebx*4]
xor edx, edx
nop dword [eax]
mov ebx, edi
mov edi, dword [eax + edx*4]
mov dword [ecx], edi
mov edi, ebx
inc edx
add ecx, dword [esi + 8]
cmp ebx, edx
jne 0x586f10
jmp 0x586e58
mov eax, dword [ebp + 0x18]
jmp 0x587049
mov ebx, dword [esi + 0x38]
shl ebx, 5
lea eax, [ebx - 1]
cdq
idiv dword [esi + 0x40]
mov ecx, edx
inc ecx
mov edx, 0xffffffff
shl edx, cl
sub ebx, ecx
lea edi, [ebx + 0x1f]
test ebx, ebx
cmovns edi, ebx
not edx
mov dword [esi + 0x24], 0
mov eax, 0
mov dword [esi + 0x38], ebx
cmp ebx, 0xffffffe1
jl 0x586fa9
mov ebx, edi
sar ebx, 5
mov ecx, dword [ebp + 0x10]
mov ecx, dword [ecx + 4]
cmp ebx, ecx
jge 0x586fa9
mov dword [esi + 0xc], ecx
and edi, 0xffffffe0
mov ecx, dword [esi + 0x38]
mov dword [esi + 8], ebx
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebx]
mov ebx, dword [esi + 8]
mov dword [esi + 0x20], eax
mov eax, dword [eax + ebx*4]
sub ecx, edi
je 0x586fa9
shr eax, cl
lea edi, [ebx + 1]
cmp edi, dword [esi + 0xc]
jge 0x586fa9
mov edi, dword [esi + 0x20]
mov edi, dword [edi + ebx*4 + 4]
neg cl
shl edi, cl
or eax, edi
and eax, edx
lea edi, [esi + 0x50]
mov ecx, edi
mov edx, dword [esi + 0x2c]
push dword [esi + 0x40]
push eax
push dword [esi + 0x1c]
call fcn.00587120
add esp, 0xc
test eax, eax
je 0x587043
dec dword [esi + 0x28]
mov eax, dword [ebp + 0x18]
mov ebx, dword [esi + 0x40]
cmp dword [esi + 0x38], 0
jle 0x58709f
nop dword [eax]
push eax
push dword [esi + 0x14]
push edi
push edi
push edi
call fcn.0058a340
add esp, 0x14
test eax, eax
je 0x587043
dec ebx
mov eax, dword [ebp + 0x18]
jne 0x586fe0
mov edx, dword [esi + 0x38]
mov ebx, dword [esi + 0x40]
sub edx, ebx
mov ecx, dword [ebp + 0x10]
mov dword [esi + 0x38], edx
call fcn.005870d0
and eax, dword [esi + 0x28]
lea ecx, [esi + 0x68]
mov edx, dword [esi + 0x2c]
push ebx
push eax
push dword [esi + 0x1c]
call fcn.00587120
add esp, 0xc
test eax, eax
je 0x587043
mov ebx, dword [ebp + 0x18]
push ebx
push dword [esi + 0x14]
lea eax, [esi + 0x68]
push eax
push edi
push edi
call fcn.0058a340
add esp, 0x14
test eax, eax
mov eax, ebx
jne 0x586fcc
jmp 0x587046
mov eax, dword [ebp + 0x18]
mov edi, dword [esi + 0x14]
mov ebx, dword [esi + 0x30]
mov ecx, dword [esi + 0x1c]
cmp dword [ebp + 0x1c], 0
jne 0x587065
push edi
mov edi, ecx
call fcn.0058a910
mov ecx, edi
mov eax, dword [ebp + 0x18]
add esp, 4
test ecx, ecx
je 0x58708b
push ebx
push ecx
call fcn.005e8480
add esp, 8
push 0x485
push str.crypto_bn_bn_exp.c
push dword [esi + 0x44]
call fcn.005db5b0
mov eax, dword [ebp + 0x18]
add esp, 0xc
push eax
call fcn.00584cd0
add esp, 4
mov eax, dword [esi + 0x24]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push eax
mov eax, dword [esi + 0x14]
push eax
push edi
mov edi, eax
push dword [ebp + 8]
call fcn.0058a770
add esp, 0x10
xor ecx, ecx
test eax, eax
mov eax, dword [ebp + 0x18]
setne cl
mov dword [esi + 0x24], ecx
jmp 0x587049