Function at 0x510760
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
mov ebp, ecx
push esi
push ebx
mov ebx, eax
sub esp, 0x7c
mov edi, dword [ecx]
mov dword [esp + 0x38], edx
mov eax, dword [esp + 0x94]
mov dword [esp + 0x20], edi
and edi, 0x1000
je 0x51078c
mov dword [esp + 0x60], ebx
lea ebx, [esp + 0x60]
mov esi, dword [esp + 0x20]
mov edx, esi
and edx, 0x18
mov dword [esp + 0x28], edx
je 0x5107c0
cmp dword [esp + 0x90], 0xffffffff
jne 0x510954
mov edi, dword [ebp + 4]
and esi, 0xc0
mov dword [esp + 0x28], esi
mov dword [esp + 0x90], edi
jmp 0x5107d9
mov edx, eax
and edx, 0xc0
cmp dword [esp + 0x90], 0xffffffff
cmove edx, dword [esp + 0x28]
mov dword [esp + 0x28], edx
mov esi, eax
mov dword [esp + 0x34], 1
and esi, 0xffffff3f
test dword [esp + 0x20], 0x800
mov dword [esp + 0x24], esi
je 0x510806
xor ecx, ecx
test ah, 8
setne cl
add ecx, 1
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x20]
test cl, 6
je 0x510910
mov esi, dword [ebx]
xor edi, edi
test esi, esi
je 0x51094a
mov ebx, ecx
and ebx, 2
mov dword [esp + 0x40], ebx
jne 0x5109a0
cmp dword [esp + 0x90], 0xffffffff
jne 0x510df0
mov dword [esp + 0x50], 0
mov dword [esp + 0x4c], 0x10
and eax, 0x800
mov dword [esp + 0x30], 0
xor edi, edi
mov dword [esp + 0x48], eax
mov dword [esp + 0x2c], ebp
jmp 0x5108b5
mov ecx, dword [ebx + 8]
mov eax, dword [esp + 0x24]
mov dword [esp], 0xffffffff
test ecx, ecx
mov dword [esp + 4], eax
je 0x510b7f
lea eax, [esp + 0x64]
xor edx, edx
call sym._asn1_template_ex_i2d
lea esi, [esi]
cmp eax, 0xffffffff
je 0x510954
mov ecx, dword [esp + 0x30]
mov edx, 0x7fffffff
sub edx, eax
cmp edx, ecx
jl 0x510954
add ecx, eax
mov dword [esp + 0x30], ecx
add edi, 1
mov dword [esp], esi
call sym._OPENSSL_sk_num
cmp edi, eax
jge 0x510ca4
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._OPENSSL_sk_value
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x2c]
call dword [eax + 0x10]
mov ebx, eax
mov edx, dword [eax + 0x10]
movzx eax, byte [eax]
test al, al
je case.0x510900.0
mov ebp, dword [esp + 0x64]
test ebp, ebp
je case.0x510900.3
test edx, edx
jne 0x510a90
cmp al, 6
ja case.0x510900.3
jmp dword [eax*4 + 0x812828]
test byte [esp + 0x20], 0x10
mov eax, dword [ebp + 0x10]
je 0x510963
call eax
mov edi, dword [esp + 0x24]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], ebx
mov dword [esp + 0x10], edi
call sym._ASN1_item_ex_i2d
test eax, eax
mov edi, eax
jne 0x5109f0
add esp, 0x7c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
add esp, 0x7c
mov edi, 0xffffffff
pop ebx
mov eax, edi
pop esi
pop edi
pop ebp
ret
mov esi, dword [esp + 0x28]
or esi, dword [esp + 0x24]
call eax
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp], ebx
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x90]
mov dword [esp + 4], eax
mov dword [esp + 0xc], esi
call sym._ASN1_item_ex_i2d
add esp, 0x7c
mov edi, eax
pop ebx
mov eax, edi
pop esi
pop edi
pop ebp
ret
and ecx, 4
mov dword [esp + 0x40], ecx
je 0x510db2
cmp dword [esp + 0x90], 0xffffffff
mov dword [esp + 0x50], 2
je 0x5110ea
mov ecx, dword [esp + 0x20]
mov edx, 0x11
and ecx, 0x10
cmove edi, dword [esp + 0x28]
cmove edx, dword [esp + 0x90]
mov dword [esp + 0x40], edi
mov dword [esp + 0x4c], edx
jmp 0x51084c
mov eax, dword [esp + 0x90]
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call sym._ASN1_object_size
mov edx, dword [esp + 0x38]
mov esi, eax
test edx, edx
je 0x510a84
cmp eax, 0xffffffff
je 0x510a84
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x34]
mov dword [esp], edx
mov dword [esp + 8], edi
mov edi, edx
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x90]
mov dword [esp + 4], eax
mov dword [esp + 0xc], ecx
call sym._ASN1_put_object
call dword [ebp + 0x10]
mov edx, dword [esp + 0x24]
mov dword [esp + 4], edi
mov edi, esi
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], eax
mov dword [esp], ebx
mov dword [esp + 0x10], edx
call sym._ASN1_item_ex_i2d
cmp dword [esp + 0x34], 2
jne 0x51094a
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call sym._ASN1_put_eoc
jmp 0x51094a
mov edi, esi
jmp 0x51094a
mov ecx, dword [edx + 0x10]
test ecx, ecx
mov dword [esp + 0x3c], ecx
je 0x5108fc
cmp al, 6
ja case.0x510900.3
jmp dword [eax*4 + 0x812844]
lea ebp, [esp + 0x64]
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebx
mov dword [esp], 6
mov eax, dword [esp + 0x3c]
mov dword [esp + 4], ebp
call eax
test eax, eax
je case.0x510900.3
mov dword [esp + 4], ebx
mov dword [esp], ebp
call sym._asn1_get_choice_selector
test eax, eax
js 0x510af2
cmp eax, dword [ebx + 0xc]
jl 0x510e40
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], ebp
mov dword [esp], 7
mov eax, dword [esp + 0x3c]
call eax
jmp case.0x510900.3
mov dword [esp + 0x3c], 0
lea esi, [esi]
mov ecx, dword [esp + 0x48]
xor eax, eax
test ecx, ecx
setne al
add eax, 1
mov dword [esp + 0x54], eax
lea eax, [esp + 0x6c]
lea ebp, [esp + 0x64]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], 0
mov dword [esp + 8], ebp
mov dword [esp], eax
call sym._asn1_enc_restore
test eax, eax
mov dword [esp + 0x44], eax
js case.0x510900.3
je 0x510bd1
mov eax, dword [esp + 0x6c]
jmp 0x510890
mov eax, dword [esp + 0x24]
mov dword [esp], 0xffffffff
mov dword [esp + 4], eax
lea eax, [esp + 0x64]
mov ecx, ebx
xor edx, edx
call sym._asn1_i2d_ex_primitive
jmp 0x510890
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp + 0x10], eax
lea eax, [esp + 0x64]
mov dword [esp], eax
call dword [edx + 0x14]
jmp 0x510890
mov dword [esp + 0x3c], 0
mov dword [esp + 0x54], 1
jmp 0x510b32
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x6c], 0
test eax, eax
je 0x510c02
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], ebp
mov dword [esp], 6
call eax
test eax, eax
je case.0x510900.3
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx + 8]
test edx, edx
jle 0x5110cc
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], esi
mov esi, eax
mov dword [esp + 0x3c], ebx
mov edi, dword [esp + 0x44]
jmp 0x510c7d
mov dword [esp + 4], eax
mov dword [esp], ebp
call sym._asn1_get_field_ptr
mov edx, dword [esp + 0x24]
mov dword [esp], 0xffffffff
mov ecx, ebx
mov dword [esp + 4], edx
xor edx, edx
call sym._asn1_template_ex_i2d
cmp eax, 0xffffffff
je 0x510954
mov edx, dword [esp + 0x6c]
mov ecx, 0x7fffffff
sub ecx, edx
cmp eax, ecx
jg 0x510954
mov ebx, dword [esp + 0x3c]
add eax, edx
add esi, 0x14
add edi, 1
mov dword [esp + 0x6c], eax
cmp edi, dword [ebx + 0xc]
jge 0x510ed2
mov dword [esp + 8], 1
mov dword [esp + 4], esi
mov dword [esp], ebp
call sym._asn1_do_adb
test eax, eax
mov ebx, eax
jne 0x510c24
mov edi, dword [esp + 0x58]
mov esi, dword [esp + 0x5c]
jmp case.0x510900.3
mov eax, dword [esp + 0x4c]
mov ebp, dword [esp + 0x2c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call sym._ASN1_object_size
cmp eax, 0xffffffff
mov edi, eax
je 0x510954
mov eax, dword [esp + 0x20]
and eax, 0x10
mov dword [esp + 0x2c], eax
jne 0x510e72
mov eax, dword [esp + 0x38]
test eax, eax
je 0x51094a
mov eax, dword [esp + 0x40]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call sym._ASN1_put_object
call dword [ebp + 0x10]
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x20], eax
mov dword [esp + 0x6c], 0
test ecx, ecx
jne 0x510ef7
mov dword [esp + 0x28], edi
xor ebx, ebx
lea ebp, [esp + 0x68]
mov edi, dword [esp + 0x20]
jmp 0x510d7a
mov dword [esp + 4], ebx
mov dword [esp], esi
add ebx, 1
call sym._OPENSSL_sk_value
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], edi
mov dword [esp], ebp
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 4], eax
call sym._ASN1_item_ex_i2d
mov dword [esp], esi
call sym._OPENSSL_sk_num
cmp ebx, eax
jl 0x510d43
mov edi, dword [esp + 0x28]
cmp dword [esp + 0x34], 2
jne 0x51094a
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call sym._ASN1_put_eoc
mov edx, dword [esp + 0x2c]
test edx, edx
je 0x51094a
jmp 0x510a73
cmp dword [esp + 0x90], 0xffffffff
je 0x5110d5
mov edx, dword [esp + 0x20]
mov ebx, ecx
mov ecx, 0x11
mov dword [esp + 0x50], 1
and edx, 0x10
cmove ecx, dword [esp + 0x90]
cmove ebx, dword [esp + 0x28]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x40], ebx
jmp 0x51084c
mov ebx, ecx
and ebx, 0x10
mov dword [esp + 0x50], ebx
jne 0x51083c
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0x90]
mov dword [esp + 0x4c], ebx
jmp 0x51084c
lea ebp, [esp + 0x64]
mov dword [esp + 4], ebx
mov dword [esp], ebp
call sym._asn1_get_choice_selector
test eax, eax
js case.0x510900.3
cmp eax, dword [ebx + 0xc]
jge case.0x510900.3
nop
lea esi, [esi]
lea edx, [eax + eax*4]
mov eax, dword [ebx + 8]
mov dword [esp], ebp
lea ebx, [eax + edx*4]
mov dword [esp + 4], ebx
call sym._asn1_get_field_ptr
mov edx, dword [esp + 0x24]
mov dword [esp], 0xffffffff
mov ecx, ebx
mov dword [esp + 4], edx
xor edx, edx
call sym._asn1_template_ex_i2d
jmp 0x510890
mov eax, dword [esp + 0x90]
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call sym._ASN1_object_size
mov edx, dword [esp + 0x38]
mov ebx, eax
test edx, edx
je 0x511096
cmp eax, 0xffffffff
je 0x511096
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x34]
mov dword [esp + 8], edi
mov dword [esp], edx
mov edi, ebx
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x90]
mov dword [esp + 4], eax
mov dword [esp + 0xc], ecx
call sym._ASN1_put_object
jmp 0x510cec
mov edi, dword [esp + 0x58]
mov esi, dword [esp + 0x5c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 8], 0x10
mov dword [esp], eax
call sym._ASN1_object_size
jmp 0x510890
mov dword [esp], esi
call sym._OPENSSL_sk_num
cmp eax, 1
jle 0x510d33
mov dword [esp], esi
call sym._OPENSSL_sk_num
lea eax, [eax + eax*2]
mov dword [esp + 8], 0x180
mov dword [esp + 4], str.crypto_asn1_tasn_enc.c
shl eax, 2
mov dword [esp], eax
call sym._CRYPTO_malloc
test eax, eax
mov dword [esp + 0x28], eax
je 0x510d8a
mov eax, dword [esp + 0x30]
mov dword [esp + 8], 0x183
mov dword [esp + 4], str.crypto_asn1_tasn_enc.c
mov dword [esp], eax
call sym._CRYPTO_malloc
test eax, eax
mov dword [esp + 0x30], eax
je 0x5110ff
mov dword [esp + 0x3c], edi
mov dword [esp + 0x6c], eax
xor ebp, ebp
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x20]
jmp 0x510fcf
mov dword [esp + 4], ebp
mov dword [esp], esi
add ebp, 1
call sym._OPENSSL_sk_value
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x6c]
add ebx, 0xc
mov dword [ebx - 0xc], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], edi
mov dword [esp + 0x10], eax
lea eax, [esp + 0x6c]
mov dword [esp + 4], eax
lea eax, [esp + 0x68]
mov dword [esp], eax
call sym._ASN1_item_ex_i2d
mov dword [ebx - 8], eax
mov eax, dword [esp + 0x68]
mov dword [ebx - 4], eax
mov dword [esp], esi
call sym._OPENSSL_sk_num
cmp ebp, eax
jl 0x510f80
mov dword [esp], esi
mov edi, dword [esp + 0x3c]
xor ebx, ebx
call sym._OPENSSL_sk_num
mov ebp, dword [esp + 0x28]
mov dword [esp + 4], eax
mov dword [esp + 0xc], sym._der_cmp
mov dword [esp + 8], 0xc
mov dword [esp], ebp
call sym._qsort
mov eax, dword [esp + 0x38]
mov eax, dword [eax]
mov dword [esp + 0x6c], eax
jmp 0x51103c
mov eax, dword [ebp]
mov edx, dword [ebp + 4]
add ebx, 1
add ebp, 0xc
mov dword [esp + 4], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 8], edx
mov dword [esp], eax
call sym._memcpy
mov eax, dword [ebp - 8]
add dword [esp + 0x6c], eax
mov dword [esp], esi
call sym._OPENSSL_sk_num
cmp ebx, eax
jl 0x511015
cmp dword [esp + 0x50], 2
mov eax, dword [esp + 0x6c]
mov ebx, dword [esp + 0x38]
mov dword [ebx], eax
je 0x51109d
mov eax, dword [esp + 0x28]
mov dword [esp + 8], 0x1aa
mov dword [esp + 4], str.crypto_asn1_tasn_enc.c
mov dword [esp], eax
call sym._CRYPTO_free
mov eax, dword [esp + 0x30]
mov dword [esp + 8], 0x1ab
mov dword [esp + 4], str.crypto_asn1_tasn_enc.c
mov dword [esp], eax
call sym._CRYPTO_free
jmp 0x510d8a
mov edi, ebx
jmp 0x51094a
mov ebp, dword [esp + 0x28]
xor ebx, ebx
jmp 0x5110be
mov eax, dword [ebp + 8]
mov dword [esp + 4], ebx
add ebp, 0xc
mov dword [esp], esi
add ebx, 1
mov dword [esp + 8], eax
call sym._OPENSSL_sk_set
mov dword [esp], esi
call sym._OPENSSL_sk_num
cmp ebx, eax
jl 0x5110a5
jmp 0x511059
mov eax, dword [esp + 0x6c]
jmp 0x510eda
mov dword [esp + 0x50], 1
mov dword [esp + 0x4c], 0x11
jmp 0x51084c
mov dword [esp + 0x40], 0
mov dword [esp + 0x4c], 0x11
jmp 0x51084c
mov eax, dword [esp + 0x28]
mov dword [esp + 8], 0x185
mov dword [esp + 4], str.crypto_asn1_tasn_enc.c
mov dword [esp], eax
call sym._CRYPTO_free
jmp 0x510d8a