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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xa8
mov ebp, dword [esp + 0xd0]
mov ebx, dword [esp + 0xcc]
mov esi, dword [esp + 0xc8]
mov eax, dword [esp + 0xc4]
mov dword [esp + 0x1c], eax
mov edi, dword [esp + 0xc0]
mov eax, dword [esp + 0xbc]
mov dword [esp + 0x20], eax
push esi
call fcn.0058ad00
add esp, 4
test eax, eax
je 0x5873a1
cmp dword [esi + 4], 0x1fffff
jg 0x5873d2
push 4
push dword [esp + 0x20]
call fcn.005899a0
add esp, 8
test eax, eax
jne 0x587392
push 4
push edi
call fcn.005899a0
add esp, 8
test eax, eax
jne 0x587392
push 4
push esi
call fcn.005899a0
add esp, 8
test eax, eax
je 0x5873d2
add esp, 0xa8
pop esi
pop edi
pop ebx
pop ebp
jmp fcn.00587ca0
call fcn.005b7120
push str.BN_mod_exp_mont
push 0x148
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 ebx, ebx
jmp 0x587829
push dword [esp + 0x1c]
call fcn.00589790
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
je 0x58746e
mov dword [esp + 4], ebp
push ebx
call fcn.00586200
add esp, 4
push ebx
call fcn.005863b0
add esp, 4
mov dword [esp + 0x14], eax
push ebx
call fcn.005863b0
add esp, 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
push ebx
call fcn.005863b0
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
je 0x587493
mov ebp, eax
mov eax, dword [esp + 4]
mov ecx, eax
test eax, eax
je 0x5874a8
mov dword [esp], ecx
cmp dword [edi + 0xc], 0
jne 0x58744d
push esi
push edi
call fcn.0058a590
add esp, 8
test eax, eax
js 0x5874f3
mov ebx, dword [esp + 8]
push ebx
push esi
push edi
push ebp
call fcn.0058aea0
add esp, 0x10
mov edi, ebp
test eax, eax
jne 0x5874f7
xor ebx, ebx
jmp 0x587809
push 1
push esi
call fcn.0058ac10
add esp, 8
test eax, eax
je 0x5874d6
push dword [esp + 0x20]
call fcn.0058abf0
add esp, 4
mov ebx, 1
jmp 0x587829
xor ebx, ebx
xor ecx, ecx
mov ebp, dword [esp + 4]
test ebp, ebp
jne 0x58781d
jmp 0x587814
call fcn.0058be70
xor ebx, ebx
test eax, eax
je 0x5874ec
push dword [esp + 8]
push esi
push eax
mov dword [esp + 0xc], eax
call fcn.0058bf70
mov ecx, dword [esp + 0xc]
add esp, 0xc
test eax, eax
jne 0x587432
jmp 0x587814
push 1
push dword [esp + 0x24]
call fcn.00589dc0
add esp, 0xb0
jmp 0x587831
xor ecx, ecx
jmp 0x587814
mov ebx, dword [esp + 8]
push ebx
push dword [esp + 4]
push edi
push ebp
call fcn.0058be50
add esp, 0x10
xor ebx, ebx
test eax, eax
je 0x587809
mov edi, 6
mov eax, dword [esp + 0x18]
cmp eax, 0x29f
jg 0x58754c
mov edi, 5
cmp eax, 0xef
jg 0x58754c
mov edi, 4
cmp eax, 0x4f
jg 0x58754c
mov dword [esp + 0x10], 1
mov edi, 3
cmp eax, 0x18
jl 0x5875cc
push dword [esp + 8]
push dword [esp + 4]
push ebp
push ebp
push dword [esp + 0x24]
call fcn.0058b950
add esp, 0x14
test eax, eax
je 0x587809
mov dword [esp + 0x24], edi
lea eax, [edi - 1]
mov dword [esp + 0x10], eax
mov ebp, 2
nop word [eax + eax]
mov edi, dword [esp + 8]
push edi
call fcn.005863b0
add esp, 4
mov dword [esp + ebp*4 + 0x24], eax
test eax, eax
je 0x587809
push edi
push dword [esp + 4]
push dword [esp + 0x1c]
push dword [esp + ebp*4 + 0x2c]
push eax
call fcn.0058b950
add esp, 0x14
test eax, eax
je 0x587809
mov eax, ebp
mov ecx, dword [esp + 0x10]
shr eax, cl
inc ebp
test eax, eax
je 0x587580
mov eax, dword [esp + 0x24]
mov dword [esp + 0x10], eax
mov eax, dword [esi]
mov edi, dword [esi + 4]
cmp dword [eax + edi*4 - 4], 0
js 0x587600
call fcn.00589710
push dword [esp + 8]
push dword [esp + 4]
push eax
mov esi, dword [esp + 0x18]
push esi
call fcn.0058be50
add esp, 0x10
test eax, eax
jne 0x5876d3
jmp 0x587809
push edi
mov ebp, dword [esp + 0x10]
push ebp
call fcn.00589cf0
add esp, 8
test eax, eax
je 0x587809
mov eax, dword [esi]
xor edx, edx
sub edx, dword [eax]
mov ecx, dword [ebp]
mov dword [ecx], edx
cmp edi, 2
jl 0x5876cc
cmp edi, 9
setb dl
mov esi, ecx
sub esi, eax
cmp esi, 0x20
setb dh
or dh, dl
mov edx, 1
jne 0x58767f
lea esi, [edi - 1]
mov ebx, esi
and ebx, 0xfffffff8
lea edx, [ebx + 1]
xor ebp, ebp
pcmpeqd xmm0, xmm0
movdqu xmm1, xmmword [eax + ebp*4 + 4]
movdqu xmm2, xmmword [eax + ebp*4 + 0x14]
pxor xmm1, xmm0
pxor xmm2, xmm0
movdqu xmmword [ecx + ebp*4 + 4], xmm1
movdqu xmmword [ecx + ebp*4 + 0x14], xmm2
add ebp, 8
cmp ebx, ebp
jne 0x587654
cmp esi, ebx
je 0x5876cc
mov ebx, edi
sub ebx, edx
mov esi, edx
and ebx, 3
je 0x587698
mov esi, edx
mov ebp, dword [eax + esi*4]
not ebp
mov dword [ecx + esi*4], ebp
inc esi
dec ebx
jne 0x58768c
sub edx, edi
cmp edx, 0xfffffffc
ja 0x5876cc
mov edx, dword [eax + esi*4]
not edx
mov dword [ecx + esi*4], edx
mov edx, dword [eax + esi*4 + 4]
not edx
mov dword [ecx + esi*4 + 4], edx
mov edx, dword [eax + esi*4 + 8]
not edx
mov dword [ecx + esi*4 + 8], edx
mov edx, dword [eax + esi*4 + 0xc]
not edx
mov dword [ecx + esi*4 + 0xc], edx
add esi, 4
cmp edi, esi
jne 0x58769f
mov esi, dword [esp + 0xc]
mov dword [esi + 4], edi
mov edi, dword [esp + 0x18]
dec edi
mov al, 1
mov dword [esp + 0x14], eax
xor ebx, ebx
lea ebp, [edi - 1]
jmp 0x5876ef
dec ebp
sub edi, 1
jb 0x5877e3
push edi
push dword [esp + 0x20]
call fcn.0058a820
add esp, 8
test eax, eax
jne 0x587721
test bl, 1
je 0x5876e5
push dword [esp + 8]
push dword [esp + 4]
push esi
push esi
push esi
call fcn.0058b950
add esp, 0x14
test eax, eax
jne 0x5876e5
jmp 0x587467
mov dword [esp + 0x18], edi
cmp dword [esp + 0x10], 2
jb 0x587766
xor esi, esi
mov edi, 1
mov ebx, 1
test ebp, ebp
js 0x58776d
push ebp
push dword [esp + 0x20]
call fcn.0058a820
add esp, 8
mov ecx, ebx
sub ecx, esi
mov edx, edi
shl edx, cl
or edx, 1
test eax, eax
cmovne edi, edx
cmovne esi, ebx
inc ebx
dec ebp
cmp dword [esp + 0x10], ebx
jne 0x587738
jmp 0x58776d
mov edi, 1
xor esi, esi
test esi, esi
sets al
mov ecx, dword [esp + 0x14]
or cl, al
test cl, 1
mov ebp, dword [esp + 4]
mov eax, dword [esp]
jne 0x5877a9
lea ebx, [esi + 1]
push dword [esp + 8]
push eax
mov eax, dword [esp + 0x14]
push eax
push eax
push eax
call fcn.0058b950
add esp, 0x14
test eax, eax
je 0x587836
dec ebx
mov eax, dword [esp]
jne 0x587787
and edi, 0xfffffffe
push dword [esp + 8]
push eax
push dword [esp + edi*2 + 0x30]
mov eax, dword [esp + 0x18]
push eax
push eax
call fcn.0058b950
add esp, 0x14
test eax, eax
je 0x587836
not esi
mov dword [esp + 0x14], 0
mov edi, dword [esp + 0x18]
add edi, esi
mov bl, 1
mov esi, dword [esp + 0xc]
jns 0x5876e0
push dword [esp + 8]
mov eax, esi
mov esi, dword [esp + 4]
push esi
push eax
push dword [esp + 0x2c]
call fcn.0058bd80
mov ecx, esi
add esp, 0x10
xor ebx, ebx
test eax, eax
setne bl
jmp 0x587497
mov ebp, dword [esp + 4]
mov ecx, dword [esp]
test ebp, ebp
jne 0x58781d
push ecx
call fcn.0058bf20
add esp, 4
push dword [esp + 8]
call fcn.005862e0
add esp, 4
mov eax, ebx
add esp, 0xa8
pop esi
pop edi
pop ebx
pop ebp
ret
xor ebx, ebx
mov ecx, dword [esp]
test ebp, ebp
jne 0x58781d
jmp 0x587814