Function at 0x587ca0
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.0058ad00
add esp, 4
test eax, eax
je 0x587ce9
mov edi, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebx + 4]
cmp edx, 0x200000
jl 0x587d1a
push edi
push eax
push ebx
push ecx
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00587310
jmp 0x5886a7
call fcn.005b7120
push str.BN_mod_exp_mont_consttime
push 0x277
push str.crypto_bn_bn_exp.c
call fcn.005b7220
add esp, 0xc
push 0
push 0x66
push 3
call fcn.005b7310
add esp, 0xc
xor eax, eax
jmp 0x5886a7
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x587e0d
mov dword [esi + 0x38], ecx
mov dword [esi + 0x2c], edx
push eax
call fcn.00586200
add esp, 4
test edi, edi
je 0x587e31
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0xc], 0
mov dword [esi + 0x14], edi
jne 0x587d59
push ebx
push eax
call fcn.0058a590
mov ecx, dword [ebp + 0xc]
add esp, 8
test eax, eax
js 0x587d8a
mov edi, dword [ebp + 0x18]
push edi
call fcn.005863b0
add esp, 4
test eax, eax
je 0x587e6c
push edi
push ebx
push dword [ebp + 0xc]
push eax
mov edi, eax
call fcn.0058aea0
add esp, 0x10
mov ecx, edi
test eax, eax
mov edi, dword [esi + 0x14]
je 0x587f69
mov dword [esi + 8], ecx
mov ecx, 6
mov edx, dword [esi + 0x38]
cmp edx, 0x1d
jg 0x587dbc
mov ecx, 5
cmp edx, 9
jg 0x587dbc
mov ecx, 4
cmp edx, 2
jg 0x587dbc
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 0x587e97
add eax, 3
and eax, 0xfffffffc
call fcn.00789f40
mov ecx, esp
and ecx, 0xfffffff0
mov esp, ecx
xor eax, eax
jmp 0x587eb4
push 1
push ebx
call fcn.0058ac10
add esp, 8
test eax, eax
je 0x587e88
push dword [ebp + 8]
call fcn.0058abf0
add esp, 4
mov eax, 1
jmp 0x5886a7
call fcn.0058be70
test eax, eax
je 0x587f83
mov edi, eax
push dword [ebp + 0x18]
push ebx
push eax
call fcn.0058bf70
add esp, 0xc
test eax, eax
jne 0x587d3c
xor ecx, ecx
xor ebx, ebx
mov dword [esi + 0x44], 0
mov dword [esi + 0x24], 0
jmp 0x588665
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 0x58865f
push 1
push dword [ebp + 8]
call fcn.00589dc0
jmp 0x5886a7
push 0x2e9
push str.crypto_bn_bn_exp.c
push eax
call fcn.005dc9b0
add esp, 0xc
mov ecx, eax
test eax, eax
je 0x5881df
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 0x587f9c
call fcn.00589710
lea ecx, [esi + 0x50]
mov ebx, dword [ebp + 0x18]
push ebx
mov edi, dword [esi + 0x14]
push edi
push eax
push ecx
call fcn.0058be50
add esp, 0x10
test eax, eax
jne 0x588098
mov dword [esi + 0x24], 0
mov eax, ebx
jmp 0x588659
mov dword [esi + 0x24], 0
mov dword [esi + 0x44], 0
xor ebx, ebx
xor ecx, ecx
mov eax, dword [ebp + 0x18]
jmp 0x58865f
xor ecx, ecx
xor ebx, ebx
mov dword [esi + 0x44], 0
xor edi, edi
mov dword [esi + 0x24], 0
jmp 0x588665
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 0x58808f
mov dword [esi + 0xc], 1
cmp edi, 0xd
jb 0x588026
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 0x588026
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 0x587ff9
cmp edi, ecx
mov edi, dword [esi + 0x2c]
je 0x58808f
mov edx, edi
mov ebx, dword [esi + 0xc]
sub edx, ebx
and edx, 3
mov edi, dword [esi + 0x34]
je 0x588044
mov ebx, dword [esi + 0xc]
mov ecx, dword [eax + ebx*4]
not ecx
mov dword [edi + ebx*4], ecx
inc ebx
dec edx
jne 0x588038
mov edi, dword [esi + 0x2c]
mov ecx, dword [esi + 0xc]
sub ecx, edi
cmp ecx, 0xfffffffc
ja 0x58808f
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 0x588062
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.0058be50
add esp, 0x10
mov dword [esi + 0x24], 0
test eax, eax
je 0x588536
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 0x5881ad
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 0x588171
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 0x588130
cmp dword [esi + 8], 0
je 0x5881ad
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 0x5881a0
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 0x5882d3
mov ecx, dword [esi + 0x68]
mov eax, dword [esi + 8]
mov ebx, eax
and ebx, 3
cmp eax, 4
jae 0x5881fd
mov edi, 1
xor eax, eax
jmp 0x588296
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 0x58865f
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 0x588260
inc edi
mov ebx, dword [esi + 0x4c]
test ebx, ebx
je 0x5882d3
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 0x5882c0
cmp dword [esi + 0x40], 2
jb 0x58853e
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.0058b950
add esp, 0x14
test eax, eax
je 0x588536
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 0x5883f3
mov ecx, dword [esi + 0x50]
mov eax, dword [esi + 8]
mov ebx, eax
and ebx, 3
cmp eax, 4
jae 0x58832f
mov edi, 2
xor eax, eax
jmp 0x5883bc
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 0x588384
add edi, 2
mov ebx, dword [esi + 0x24]
test ebx, ebx
je 0x5883f3
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 0x5883e0
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 0x58847b
mov eax, dword [esi + 0x10]
inc eax
inc dword [esi + 0x18]
mov dword [esi + 0x10], eax
cmp eax, dword [esi + 0x4c]
je 0x58853e
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.0058b950
add esp, 0x14
test eax, eax
je 0x588536
mov edi, dword [esi + 0x54]
mov eax, dword [esi + 0x2c]
cmp edi, eax
cmovge edi, eax
test edi, edi
jle 0x588468
mov ecx, dword [esi + 0x50]
xor edx, edx
mov ebx, dword [esi + 0x10]
cmp edi, 4
jb 0x588508
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 0x5884d0
add ebx, 3
mov edi, dword [esi + 0x7c]
and edi, 3
je 0x588468
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 0x588520
jmp 0x588468
mov eax, dword [ebp + 0x18]
jmp 0x588659
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 0x5885b9
mov ebx, edi
sar ebx, 5
mov ecx, dword [ebp + 0x10]
mov ecx, dword [ecx + 4]
cmp ebx, ecx
jge 0x5885b9
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 0x5885b9
shr eax, cl
lea edi, [ebx + 1]
cmp edi, dword [esi + 0xc]
jge 0x5885b9
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.00588730
add esp, 0xc
test eax, eax
je 0x588653
dec dword [esi + 0x28]
mov eax, dword [ebp + 0x18]
mov ebx, dword [esi + 0x40]
cmp dword [esi + 0x38], 0
jle 0x5886af
nop dword [eax]
push eax
push dword [esi + 0x14]
push edi
push edi
push edi
call fcn.0058b950
add esp, 0x14
test eax, eax
je 0x588653
dec ebx
mov eax, dword [ebp + 0x18]
jne 0x5885f0
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.005886e0
and eax, dword [esi + 0x28]
lea ecx, [esi + 0x68]
mov edx, dword [esi + 0x2c]
push ebx
push eax
push dword [esi + 0x1c]
call fcn.00588730
add esp, 0xc
test eax, eax
je 0x588653
mov ebx, dword [ebp + 0x18]
push ebx
push dword [esi + 0x14]
lea eax, [esi + 0x68]
push eax
push edi
push edi
call fcn.0058b950
add esp, 0x14
test eax, eax
mov eax, ebx
jne 0x5885dc
jmp 0x588656
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 0x588675
push edi
mov edi, ecx
call fcn.0058bf20
mov ecx, edi
mov eax, dword [ebp + 0x18]
add esp, 4
test ecx, ecx
je 0x58869b
push ebx
push ecx
call fcn.005e9a90
add esp, 8
push 0x485
push str.crypto_bn_bn_exp.c
push dword [esi + 0x44]
call fcn.005dcbc0
mov eax, dword [ebp + 0x18]
add esp, 0xc
push eax
call fcn.005862e0
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.0058bd80
add esp, 0x10
xor ecx, ecx
test eax, eax
mov eax, dword [ebp + 0x18]
setne cl
mov dword [esi + 0x24], ecx
jmp 0x588659