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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xac
mov ebp, dword [esp + 0xd0]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], ecx
fld qword [esp + 0xc4]
test ebp, ebp
jns 0x5216ad
mov ebp, 6
fldz
fucomp st(1)
fnstsw ax
test ah, 0x45
je 0x521a90
test byte [esp + 0xd4], 2
je 0x521a07
mov dword [esp + 0x28], 1
mov dword [esp + 0x2c], 0x2b
cmp dword [esp + 0xd8], 2
je 0x521a39
mov ecx, dword [esp + 0xd8]
test ecx, ecx
jne 0x521d30
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
jmp 0x521712
fstp st(0)
fldz
fucomp st(1)
fnstsw ax
test ah, 0x45
jne 0x52171f
fchs
fld qword [0x750558]
fxch st(1)
fucom st(1)
fnstsw ax
fstp st(1)
test ah, 0x45
je 0x5219f8
fnstcw word [esp + 0x56]
mov ax, word [esp + 0x56]
mov ah, 0xc
mov dword [esp + 0x1c], ebp
mov word [esp + 0x54], ax
cmp ebp, 9
fld st(0)
fldcw word [esp + 0x54]
fistp qword [esp + 0x48]
fldcw word [esp + 0x56]
mov ecx, dword [esp + 0x48]
jle 0x521769
mov dword [esp + 0x1c], 9
test ebp, ebp
je 0x521d60
mov edi, dword [esp + 0x1c]
mov eax, edi
dec eax
je 0x521e50
cmp edi, 2
je 0x521e60
cmp edi, 3
je 0x521ec3
cmp edi, 4
je 0x521f30
cmp edi, 5
je 0x521ea4
cmp edi, 6
je 0x521f73
cmp edi, 7
je 0x521f89
cmp ebp, 8
je 0x521f94
fld dword [str._knN]
fldcw word [esp + 0x54]
fistp dword [esp + 0x50]
fldcw word [esp + 0x56]
test eax, eax
mov edx, dword [esp + 0x50]
je 0x521e40
mov eax, dword [esp + 0x1c]
cmp eax, 2
je 0x521e70
cmp eax, 3
je 0x521ed0
cmp eax, 4
je 0x521f40
cmp eax, 5
je 0x521f5d
cmp eax, 6
je 0x521f68
cmp eax, 7
je 0x521f7e
cmp ebp, 8
je 0x521f9f
fld dword [str._knN]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], 0
fild qword [esp + 0x10]
fsubp st(2)
fmulp st(1)
fldcw word [esp + 0x54]
fist dword [esp + 0x50]
fldcw word [esp + 0x56]
mov esi, dword [esp + 0x50]
mov dword [esp + 0x10], esi
fild dword [esp + 0x10]
fsubp st(1)
fld dword [0x750560]
fxch st(1)
fucompp
fnstsw ax
test ah, 5
jne 0x521864
inc esi
cmp esi, edx
jb 0x52186b
inc ecx
sub esi, edx
xor edi, edi
mov dword [esp + 0x3c], esi
jmp 0x521875
mov edi, ebx
mov eax, ecx
xor edx, edx
mov esi, 0xa
lea ebx, [edi + 1]
div esi
mov al, byte [edx + 0x74fe23]
mov byte [esp + 0x10], al
mov byte [esp + ebx + 0x63], al
mov eax, 0xcccccccd
mul ecx
mov ecx, edx
shr ecx, 3
setne dl
cmp ebx, 0x13
setle al
test dl, al
jne 0x521873
mov esi, dword [esp + 0x3c]
cmp ebx, 0x14
je 0x5218b5
mov edi, ebx
mov byte [esp + edi + 0x64], 0
test ebp, ebp
je 0x521bf6
cmp dword [esp + 0xd8], 2
mov ebp, dword [esp + 0x1c]
sete cl
xor ebx, ebx
mov eax, 0xcccccccd
mul esi
shr edx, 3
mov eax, edx
lea edx, [edx + edx*4]
add edx, edx
sub esi, edx
test ebx, ebx
mov edx, esi
mov esi, eax
jne 0x521bd5
test cl, cl
je 0x521bd5
test edx, edx
jne 0x521bd5
dec ebp
jne 0x521cb8
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x3c], 0
mov eax, ebp
mov byte [esp + eax + 0x78], 0
cmp dword [esp + 0x20], 1
je 0x521c10
mov ebx, dword [esp + 0xcc]
mov eax, dword [esp + 0x3c]
sub ebx, edi
mov edx, dword [esp + 0x28]
sub ebx, eax
test eax, eax
setg al
and eax, 0xff
sub ebx, eax
mov eax, dword [esp + 0x20]
sub ebx, edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x28], ebx
mov edx, ebx
mov ecx, dword [esp + 0xd4]
mov esi, dword [esp + 0x38]
and ecx, 1
mov ebx, dword [esp + 0x34]
mov ebp, dword [esp + 0x30]
mov dword [esp + 0x10], ecx
test edx, edx
js 0x521cc1
mov eax, dword [esp + 0xd4]
and eax, 0x10
test ecx, ecx
je 0x521cd0
neg edx
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x5219b5
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
mov ecx, esi
mov edx, ebx
mov eax, ebp
call fcn.00520e40
test eax, eax
je 0x5219fa
test edi, edi
je 0x521d74
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0xc0]
jmp 0x5219d8
test edi, edi
je 0x521d70
dec edi
mov ecx, esi
mov edx, dword [esp + 0x28]
movsx eax, byte [esp + edi + 0x64]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov eax, ebp
call fcn.00520e40
test eax, eax
jne 0x5219d0
jmp 0x5219fa
fstp st(0)
xor eax, eax
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0xd4]
and eax, 4
mov dword [esp + 0x2c], eax
je 0x521ad0
mov dword [esp + 0x28], 1
mov dword [esp + 0x2c], 0x20
cmp dword [esp + 0xd8], 2
jne 0x5216e8
fldz
fxch st(1)
fucom st(1)
fnstsw ax
fstp st(1)
and ah, 0x45
cmp ah, 0x40
jne 0x521b90
fld st(0)
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
test ebp, ebp
jne 0x521a6a
mov ebp, 1
mov edx, dword [esp + 0x20]
test edx, edx
jne 0x521d53
fstp st(0)
mov eax, dword [esp + 0x24]
inc eax
sub ebp, eax
jns 0x521712
fstp st(0)
jmp 0x5219fa
cmp dword [esp + 0xd8], 2
je 0x521b80
mov eax, dword [esp + 0xd8]
test eax, eax
jne 0x521ae0
mov dword [esp + 0x20], 0
mov dword [esp + 0x28], 1
mov dword [esp + 0x2c], 0x2d
mov dword [esp + 0x24], 0
jmp 0x521712
mov dword [esp + 0x28], 0
jmp 0x5216da
mov dword [esp + 0x28], 1
mov dword [esp + 0x20], 1
mov dword [esp + 0x2c], 0x2d
fld1
fucomp st(1)
fnstsw ax
fld st(0)
test ah, 0x45
jne 0x521f50
xor edx, edx
nop
lea esi, [esi]
fmul dword [0x75052c]
dec edx
fld1
fucomp st(1)
fnstsw ax
test ah, 0x45
je 0x521b10
mov dword [esp + 0x24], edx
fld dword [0x75052c]
fxch st(1)
fucom st(1)
fnstsw ax
fstp st(1)
test ah, 0x45
jne 0x521b5a
mov edx, dword [esp + 0x24]
lea esi, [esi]
fld dword [0x75052c]
fdiv st(1), st(0)
fxch st(1)
inc edx
fucom st(1)
fnstsw ax
fstp st(1)
test ah, 0x45
je 0x521b40
mov dword [esp + 0x24], edx
cmp dword [esp + 0xd8], 2
je 0x521a61
cmp dword [esp + 0x20], 1
jne 0x521710
fstp st(1)
jmp 0x521712
mov dword [esp + 0x28], 1
mov dword [esp + 0x2c], 0x2d
fld qword [0x750550]
fucomp st(1)
fnstsw ax
mov dword [esp + 0x20], 1
test ah, 0x45
je 0x521af8
test ebp, ebp
jne 0x521e90
fld dword [0x75052c]
fxch st(1)
fucom st(1)
fnstsw ax
fstp st(1)
test ah, 5
sete al
and eax, 0xff
mov dword [esp + 0x20], eax
jmp 0x521af8
lea eax, [ebx + 1]
mov dl, byte [edx + 0x74fe23]
mov byte [esp + ebx + 0x78], dl
cmp eax, ebp
jge 0x521bf0
mov ebx, eax
jmp 0x5218d3
mov dword [esp + 0x1c], ebp
mov ebp, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x3c], eax
mov eax, ebp
jmp 0x521917
mov esi, dword [esp + 0x24]
mov ebx, 0xa
mov eax, esi
mov ebp, 0xcccccccd
sar eax, 0x1f
mov dword [esp + 0x44], edi
xor esi, eax
mov ecx, esi
xor esi, esi
sub ecx, eax
jmp 0x521c33
mov esi, edi
mov edx, ecx
mov eax, ecx
sar edx, 0x1f
lea edi, [esi + 1]
idiv ebx
mov al, byte [edx + 0x74fe23]
mov byte [esp + 0x10], al
mov byte [esp + edi + 0x8b], al
mov eax, ecx
mul ebp
mov ecx, edx
shr ecx, 3
test ecx, ecx
setg dl
cmp edi, 0x13
setle al
test dl, al
jne 0x521c31
mov dword [esp + 0x40], edi
test ecx, ecx
mov edi, dword [esp + 0x44]
jg 0x5219fa
cmp dword [esp + 0x40], 1
je 0x521eaf
mov ebx, dword [esp + 0xcc]
mov eax, dword [esp + 0x3c]
sub ebx, edi
mov ecx, dword [esp + 0x28]
sub ebx, eax
test eax, eax
setg al
and eax, 0xff
sub ebx, eax
mov eax, dword [esp + 0x40]
sub ebx, ecx
add eax, 2
sub ebx, eax
mov dword [esp + 0x28], ebx
mov edx, ebx
jmp 0x521956
xor eax, eax
mov ebx, eax
jmp 0x5218d3
mov dword [esp + 0x10], 0
jmp 0x521990
test eax, eax
je 0x5220bd
mov eax, dword [esp + 0x28]
test eax, eax
je 0x521990
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x521ee0
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x28]
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0xc0]
jmp 0x521d0c
dec edi
je 0x521e80
mov dword [esp + 4], 0x30
mov dword [esp], ebx
mov ecx, esi
mov edx, dword [esp + 0x28]
mov eax, ebp
call fcn.00520e40
test eax, eax
jne 0x521d05
jmp 0x5219fa
fldz
fxch st(1)
fucom st(1)
fnstsw ax
fstp st(1)
and ah, 0x45
xor ah, 0x40
mov dword [esp + 0x20], 1
je 0x521ac1
jmp 0x521af8
fstp st(1)
dec ebp
jmp 0x521712
mov edx, 1
fld1
jmp 0x521824
mov ebx, dword [esp + 0x28]
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x521dd0
test byte [esp + 0xd4], 8
jne 0x521dd0
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x1c]
sub edi, eax
test edi, edi
jle 0x521fae
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0xc0]
jmp 0x521dac
dec edi
je 0x521faa
mov dword [esp + 4], 0x30
mov dword [esp], ebx
mov ecx, esi
mov edx, dword [esp + 0x1c]
mov eax, ebp
call fcn.00520e40
test eax, eax
jne 0x521da5
jmp 0x5219fa
mov eax, dword [esp + 0xc0]
mov dword [esp + 4], 0x2e
mov dword [esp], eax
mov ecx, esi
mov edx, ebx
mov eax, ebp
call fcn.00520e40
test eax, eax
je 0x5219fa
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x521d86
mov dword [esp + 0x28], ebx
mov edi, eax
mov ebx, dword [esp + 0xc0]
jmp 0x521e18
test edi, edi
je 0x521ff4
dec edi
mov ecx, esi
mov edx, dword [esp + 0x28]
movsx eax, byte [esp + edi + 0x78]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov eax, ebp
call fcn.00520e40
test eax, eax
jne 0x521e10
jmp 0x5219fa
fld dword [0x75052c]
jmp 0x521824
fld dword [0x75052c]
jmp 0x5217c3
fld dword [0x750530]
jmp 0x5217c3
fld dword [0x750530]
jmp 0x521824
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
jmp 0x5219b5
mov eax, ebp
fld1
dec eax
fmul dword [0x75052c]
jne 0x521e94
fxch st(1)
jmp 0x521bbb
fld dword [0x75053c]
jmp 0x5217c3
lea eax, [esi + 2]
mov byte [esp + 0x8d], 0x30
mov dword [esp + 0x40], eax
jmp 0x521c83
fld dword [0x750534]
jmp 0x5217c3
fld dword [0x750534]
jmp 0x521824
mov eax, dword [esp + 0x2c]
mov ecx, esi
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
mov edx, ebx
mov eax, ebp
call fcn.00520e40
test eax, eax
je 0x5219fa
dec dword [esp + 0x28]
mov eax, dword [esp + 0x28]
je 0x5219b5
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], ebx
mov edi, eax
mov ebx, dword [esp + 0xc0]
jmp 0x521d0c
fld dword [0x750538]
jmp 0x5217c3
fld dword [0x750538]
jmp 0x521824
mov dword [esp + 0x24], 0
jmp 0x521b26
fld dword [0x75053c]
jmp 0x521824
fld dword [0x750540]
jmp 0x521824
fld dword [0x750540]
jmp 0x5217c3
fld dword [0x750544]
jmp 0x521824
fld dword [0x750544]
jmp 0x5217c3
fld dword [0x750548]
jmp 0x5217c3
fld dword [0x750548]
jmp 0x521824
mov ebx, dword [esp + 0x1c]
cmp dword [esp + 0x20], 1
je 0x522007
mov edi, dword [esp + 0x10]
test edi, edi
je 0x521ffd
mov dword [esp + 0x1c], ebx
mov edi, dword [esp + 0xc0]
mov ebx, dword [esp + 0x10]
jmp 0x521fd3
inc ebx
je 0x521ffd
mov dword [esp + 4], 0x20
mov dword [esp], edi
mov ecx, esi
mov edx, dword [esp + 0x1c]
mov eax, ebp
call fcn.00520e40
test eax, eax
jne 0x521fd0
jmp 0x5219fa
mov ebx, dword [esp + 0x28]
jmp 0x521d86
mov eax, 1
jmp 0x5219fc
mov eax, dword [esp + 0xd4]
mov ecx, esi
and eax, 0x20
mov edx, ebx
cmp eax, 1
sbb eax, eax
and eax, 0x20
add eax, 0x45
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
mov eax, ebp
call fcn.00520e40
test eax, eax
je 0x5219fa
mov eax, dword [esp + 0x24]
test eax, eax
js 0x5220b3
mov dword [esp + 4], 0x2b
mov eax, dword [esp + 0xc0]
mov ecx, esi
mov dword [esp], eax
mov edx, ebx
mov eax, ebp
call fcn.00520e40
test eax, eax
je 0x5219fa
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x40]
test eax, eax
jne 0x522088
jmp 0x521fb5
test edi, edi
je 0x521fb5
dec edi
mov ecx, esi
mov edx, ebx
movsx eax, byte [esp + edi + 0x8c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
mov eax, ebp
call fcn.00520e40
test eax, eax
jne 0x522080
jmp 0x5219fa
mov dword [esp + 4], 0x2d
jmp 0x52204d
mov eax, dword [esp + 0x28]
mov dword [esp + 0x10], eax
test eax, eax
jle 0x521990
mov dword [esp + 0x28], edi
mov edi, dword [esp + 0xc0]
jmp 0x522110
mov edx, dword [esi]
mov eax, dword [edi]
cmp edx, eax
ja 0x522127
test ebx, ebx
je 0x522143
cmp edx, eax
je 0x522152
cmp edx, eax
jae 0x522106
mov ecx, dword [ebp]
test ecx, ecx
jne 0x522147
mov eax, dword [ebx]
lea ecx, [edx + 1]
mov dword [esi], ecx
mov byte [eax + edx], 0x20
dec dword [esp + 0x10]
je 0x5221f5
mov ecx, dword [ebp]
test ecx, ecx
jne 0x5220e0
test ebx, ebx
je 0x5221fe
mov edx, dword [esi]
mov eax, dword [edi]
cmp edx, eax
jbe 0x5220ec
mov dword [esp + 8], 0x32c
mov dword [esp + 4], str.crypto_bio_b_print.c
mov dword [esp], str.assertion_failed:_currlen___maxlen
call fcn.00533360
cmp edx, eax
jae 0x522106
lea eax, [edx + 1]
mov dword [esi], eax
mov byte [ecx + edx], 0x20
jmp 0x522106
cmp edx, 0x7ffffbff
ja 0x5219fa
add edx, 0x400
mov eax, dword [ebx]
mov dword [edi], edx
test eax, eax
je 0x5221a0
mov dword [esp + 0xc], 0x33e
mov dword [esp + 8], str.crypto_bio_b_print.c
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0057d1b0
test eax, eax
je 0x5219fa
mov dword [ebx], eax
mov edx, dword [esi]
mov eax, dword [edi]
jmp 0x5220f0
mov dword [esp + 8], 0x334
mov dword [esp + 4], str.crypto_bio_b_print.c
mov dword [esp], edx
call fcn.0057d170
mov dword [ebx], eax
test eax, eax
je 0x5219fa
mov edx, dword [esi]
test edx, edx
je 0x5221e1
mov ecx, dword [ebp]
test ecx, ecx
je 0x52221a
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov edx, dword [esi]
mov dword [ebp], 0
cmp dword [edi], edx
ja 0x5220fb
jmp 0x522106
mov edi, dword [esp + 0x28]
jmp 0x521990
mov dword [esp + 8], 0x329
mov dword [esp + 4], str.crypto_bio_b_print.c
mov dword [esp], str.assertion_failed:_sbuffer___NULL__buffer___NULL
call fcn.00533360
mov dword [esp + 8], 0x338
mov dword [esp + 4], str.crypto_bio_b_print.c
mov dword [esp], str.assertion_failed:_sbuffer___NULL
call fcn.00533360
lea esi, [esi]
lea edi, [edi]